mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-24 22:17:50 +08:00
76bb15b9e4
* Update for geographiclib 2.0 * [geographiclib] Update to version 2.0 * Add license to ports/geographiclib/vcpkg.json * Update port-version to 1 * Update version database * Switch to vcpkg_cmake_config_fixup etc. Switch to vcpkg_cmake_configure vcpkg_cmake_install, vcpkg_cmake_config_fixup Revert to using vcpkg_fixup_pkgconfig Revert to port-version = 0 Revert to uwp exclusion to tools * run x-add-version * Formatting changes requested by dg0yt * Update version info * More cleanup * Update version info * Define LIB_OPTION, fix pkg install, etc. * Update version info * Fix pkgconfig call * Update version info * Use OFF instead of empty string for don't install * Update version info * Remove unneeded LIB_OPTION stuff. * Update version info * Add more precautionary quotes * Update version info
56 lines
1.5 KiB
CMake
56 lines
1.5 KiB
CMake
vcpkg_from_sourceforge(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO geographiclib
|
|
REF distrib-C++
|
|
FILENAME "GeographicLib-2.0.tar.gz"
|
|
SHA512 7cf67174a64082372cdd249a64460e9f61c582aaf3d2a31e4e69d811f265e078ba62f945e9f1f44be6c58de4c20d0359dd46e0fd262ffac229df0ba2c6adc848
|
|
)
|
|
|
|
vcpkg_check_features(
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
"tools" TOOLS
|
|
)
|
|
|
|
# GeographicLib's CMakeLists.txt allows the installation directories for
|
|
# all the components to be set independently. A "false" value, e.g., an
|
|
# empty string or OFF (-DBINDIR=OFF), indicates that the corresponding
|
|
# component should not be installed.
|
|
if(TOOLS)
|
|
set(TOOL_OPTION "-DBINDIR=tools/${PORT}")
|
|
else()
|
|
set(TOOL_OPTION -DBINDIR=OFF)
|
|
endif()
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS ${TOOL_OPTION}
|
|
"-DCMAKEDIR=share/${PORT}"
|
|
-DDOCDIR=OFF
|
|
-DEXAMPLEDIR=OFF
|
|
-DMANDIR=OFF
|
|
-DSBINDIR=OFF
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
vcpkg_cmake_config_fixup()
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
if(tools IN_LIST FEATURES)
|
|
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
|
endif()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/tools")
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.txt"
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
|
|
RENAME copyright)
|
|
|
|
# Install usage
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage"
|
|
"${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY)
|