mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-21 22:47:50 +08:00
e554608135
* Upgrade geographiclib to version 1.50.1 * Tinker with sourceforge download * Strip verbiage at top of geographiclib/portfile.cmake * geographiclib: fix for windows build * geographiclib: minimize size of patch file * add missing manifest * A stab at fixing uwp build error. But I'm working in the dark! * Back out of previous commit. It didn't help. * Call cmake_minimum_required first * geographiclib: remove tools from build -- incompatible with uwp * geographiclib: remove stray reference to TOOLS * geographiclib: try installing executables into tools * geographiclib: Do not build tools for uwp * geographiclib: fix up build of tools * geographiclib: Minor clean up * geographiclib: handle uwp vs tools more elegantly * geographiclib: reformation vcpkg,json * geographiclib: don't build tools by default * geographiclib: Don't register the tools as targets; this causes problems if they are moved Co-authored-by: Charles Karney <charles.karney@sri.com>
60 lines
1.7 KiB
CMake
60 lines
1.7 KiB
CMake
vcpkg_from_sourceforge (
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO geographiclib
|
|
REF distrib
|
|
FILENAME "GeographicLib-1.50.1.tar.gz"
|
|
SHA512 1db874f30957a0edb8a1df3eee6db73cc993629e3005fe912e317a4ba908e7d7580ce483bb0054c4b46370b8edaec989609fb7e4eb6ba00c80182db43db436f1
|
|
PATCHES cxx-library-only.patch
|
|
)
|
|
|
|
vcpkg_check_features (
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
INVERTED_FEATURES
|
|
"tools" SKIP_TOOLS
|
|
)
|
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
set (LIB_TYPE "SHARED")
|
|
else ()
|
|
set (LIB_TYPE "STATIC")
|
|
endif ()
|
|
|
|
if (tools IN_LIST FEATURES)
|
|
vcpkg_fail_port_install (
|
|
MESSAGE "Cannot build GeographicLib tools for UWP"
|
|
ON_TARGET uwp
|
|
)
|
|
endif ()
|
|
|
|
vcpkg_configure_cmake (
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
OPTIONS
|
|
"-DGEOGRAPHICLIB_LIB_TYPE=${LIB_TYPE}"
|
|
${FEATURE_OPTIONS}
|
|
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
|
)
|
|
|
|
vcpkg_install_cmake ()
|
|
vcpkg_fixup_cmake_targets (CONFIG_PATH share/geographiclib)
|
|
vcpkg_copy_pdbs ()
|
|
|
|
file (GLOB TOOL_LIST LIST_DIRECTORIES false
|
|
${CURRENT_PACKAGES_DIR}/tools/*)
|
|
if (TOOL_LIST)
|
|
file (INSTALL ${TOOL_LIST}
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
|
vcpkg_copy_tool_dependencies (${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
|
file (REMOVE ${TOOL_LIST})
|
|
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)
|