2022-05-12 19:27:56 -04:00
|
|
|
vcpkg_from_sourceforge(
|
2019-05-21 07:54:31 +00:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2020-07-14 11:44:21 -04:00
|
|
|
REPO geographiclib
|
2022-05-12 19:27:56 -04:00
|
|
|
REF distrib-C++
|
2024-07-15 15:58:51 -04:00
|
|
|
FILENAME "GeographicLib-${VERSION}.tar.gz"
|
2024-12-30 10:22:03 -05:00
|
|
|
SHA512 c165115228b775a4a95b318c1bac1d2871e45ea21f20043c9c9f1c165efb6848c027b883f7b19dcce8c86e71ded56eb5fdcde39f1ff94d61fdc98c9206abd1ae
|
2022-05-12 19:27:56 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
"tools" TOOLS
|
2017-04-12 16:12:17 +08:00
|
|
|
)
|
2017-04-08 01:02:59 +08:00
|
|
|
|
2022-05-12 19:27:56 -04:00
|
|
|
# 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
|
2020-07-14 11:44:21 -04:00
|
|
|
)
|
|
|
|
|
2022-05-12 19:27:56 -04:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup()
|
|
|
|
vcpkg_copy_pdbs()
|
2020-07-14 11:44:21 -04:00
|
|
|
|
2022-05-12 19:27:56 -04:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2020-07-14 11:44:21 -04:00
|
|
|
|
2022-05-12 19:27:56 -04:00
|
|
|
if(tools IN_LIST FEATURES)
|
|
|
|
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
|
|
|
endif()
|
2020-07-14 11:44:21 -04:00
|
|
|
|
2022-05-12 19:27:56 -04:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/tools")
|
2020-07-14 11:44:21 -04:00
|
|
|
|
2022-05-12 19:27:56 -04:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.txt"
|
|
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
|
|
|
|
RENAME copyright)
|
2021-10-28 00:19:28 +02:00
|
|
|
|
2022-05-12 19:27:56 -04:00
|
|
|
# Install usage
|
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY)
|