mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-29 06:09:08 +08:00
6fec1e983d
* [geographiclib] Removed cross-compile check. It is broken, and as far as I can tell, unnecessary. The target is still validated, but whether or not cross-compiling is occuring is not. Related to microsoft#8104. * [geographiclib] Port version bumped.
57 lines
1.6 KiB
CMake
57 lines
1.6 KiB
CMake
vcpkg_from_sourceforge(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO geographiclib
|
|
REF distrib-C++
|
|
FILENAME "GeographicLib-2.3.tar.gz"
|
|
SHA512 1a1bd0fc2dc3e1372cf22618af3a4340bbc6497f94c64226c97654dfff92a4bf3acf47d91592741fe0c643d401d9721f680bdb4974b8ee258fb09d525fbaec67
|
|
PATCHES remove-broken-and-unnecessary-cross-compile-check.patch
|
|
)
|
|
|
|
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)
|