2020-06-27 06:06:30 +08:00
|
|
|
vcpkg_from_sourceforge(
|
2019-05-21 15:54:31 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2020-06-27 06:06:30 +08:00
|
|
|
REPO geographiclib/distrib
|
|
|
|
REF archive
|
|
|
|
FILENAME "GeographicLib-1.47-patch1.zip"
|
|
|
|
SHA512 d8fdfd7ae093057ec1a4ab922457fe71a3fb9975df5b673c276d62a0e9c4f212dc63652830b9d89e3890bc96aafd335992943cf6a1bce8260acf932d1eb7abfd
|
2019-05-21 15:54:31 +08:00
|
|
|
PATCHES
|
2020-06-27 06:06:30 +08:00
|
|
|
remove-tools-and-fix-version.patch
|
|
|
|
fix-usage.patch
|
2017-04-12 16:12:17 +08:00
|
|
|
)
|
2017-04-08 01:02:59 +08:00
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
OPTIONS -DGEOGRAPHICLIB_LIB_TYPE=SHARED
|
|
|
|
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
|
|
|
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
|
|
|
|
# OPTIONS_RELEASE -DOPTIMIZE=1
|
|
|
|
# OPTIONS_DEBUG -DDEBUGGABLE=1
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
OPTIONS -DGEOGRAPHICLIB_LIB_TYPE=STATIC
|
|
|
|
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
|
|
|
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
|
|
|
|
# OPTIONS_RELEASE -DOPTIMIZE=1
|
|
|
|
# OPTIONS_DEBUG -DDEBUGGABLE=1
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
2019-05-23 10:17:17 +08:00
|
|
|
|
2019-08-15 14:52:30 +08:00
|
|
|
if (VCPKG_TARGET_IS_WINDOWS)
|
2019-09-06 01:43:09 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
|
2019-08-16 14:20:22 +08:00
|
|
|
else()
|
2019-09-14 06:54:32 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/GeographicLib)
|
2019-08-15 14:52:30 +08:00
|
|
|
endif()
|
2019-05-21 15:54:31 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2017-04-12 16:12:17 +08:00
|
|
|
|
2019-09-06 01:43:09 +08:00
|
|
|
file(COPY ${CURRENT_PACKAGES_DIR}/lib/pkgconfig DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
2019-05-23 10:17:17 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
|
2017-04-08 01:02:59 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2019-05-21 15:54:31 +08:00
|
|
|
|
2020-06-13 04:09:46 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|