diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/geographiclib | |
Diffstat (limited to 'vcpkg/ports/geographiclib')
| -rw-r--r-- | vcpkg/ports/geographiclib/portfile.cmake | 55 | ||||
| -rw-r--r-- | vcpkg/ports/geographiclib/usage | 4 | ||||
| -rw-r--r-- | vcpkg/ports/geographiclib/vcpkg.json | 23 |
3 files changed, 82 insertions, 0 deletions
diff --git a/vcpkg/ports/geographiclib/portfile.cmake b/vcpkg/ports/geographiclib/portfile.cmake new file mode 100644 index 0000000..ec8591f --- /dev/null +++ b/vcpkg/ports/geographiclib/portfile.cmake @@ -0,0 +1,55 @@ +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO geographiclib + REF distrib-C++ + FILENAME "GeographicLib-${VERSION}.tar.gz" + SHA512 98d26a865ac158c608ea8a397174a9582b7949daf10acf59554cec88afb4a228135f3d5b980f195d72450e4affdbf0ea2502dbd4316b2ce17817bb628ca0a714 + ) + +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) diff --git a/vcpkg/ports/geographiclib/usage b/vcpkg/ports/geographiclib/usage new file mode 100644 index 0000000..b483443 --- /dev/null +++ b/vcpkg/ports/geographiclib/usage @@ -0,0 +1,4 @@ +The package @PORT@:@TARGET_TRIPLET@ provides CMake targets: + + find_package (GeographicLib CONFIG REQUIRED) + target_link_libraries (main PRIVATE ${GeographicLib_LIBRARIES}) diff --git a/vcpkg/ports/geographiclib/vcpkg.json b/vcpkg/ports/geographiclib/vcpkg.json new file mode 100644 index 0000000..320826c --- /dev/null +++ b/vcpkg/ports/geographiclib/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "geographiclib", + "version": "2.7", + "description": "GeographicLib, a C++ library for performing geographic conversions", + "homepage": "https://geographiclib.sourceforge.io", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "tools": { + "description": "The GeographicLib tools", + "supports": "!uwp" + } + } +} |