diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2019-11-22 09:47:40 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-22 09:47:40 -0800 |
| commit | 45f4b820e5743b89bca3508ba2028cdd5d8bbd17 (patch) | |
| tree | f874a8c4a7392309bdbb86447288597ec0a4a281 /ports/geographiclib | |
| parent | 62d67d3bf8eeff1afa8009041fd08b8822676b7b (diff) | |
| parent | 8831e8f25f1ff6546ee4a5291b91d599421637b3 (diff) | |
| download | vcpkg-45f4b820e5743b89bca3508ba2028cdd5d8bbd17.tar.gz vcpkg-45f4b820e5743b89bca3508ba2028cdd5d8bbd17.zip | |
Merge branch 'master' into vcpkg_nuget
Diffstat (limited to 'ports/geographiclib')
| -rw-r--r-- | ports/geographiclib/CONTROL | 2 | ||||
| -rw-r--r-- | ports/geographiclib/fix-usage.patch | 16 | ||||
| -rw-r--r-- | ports/geographiclib/portfile.cmake | 26 | ||||
| -rw-r--r-- | ports/geographiclib/usage | 8 |
4 files changed, 34 insertions, 18 deletions
diff --git a/ports/geographiclib/CONTROL b/ports/geographiclib/CONTROL index 0d585a281..2738c3d74 100644 --- a/ports/geographiclib/CONTROL +++ b/ports/geographiclib/CONTROL @@ -1,4 +1,4 @@ Source: geographiclib -Version: 1.47-patch1-5 +Version: 1.47-patch1-10 Homepage: https://sourceforge.net/projects/geographiclib/ Description: a small set of C++ classes for performing conversions between geographic, UTM, UPS, MGRS, geocentric, and local cartesian coordinates, for gravity (e.g., EGM2008), geoid height, and geomagnetic field (e.g., WMM2010) calculations, and for solving geodesic problems. diff --git a/ports/geographiclib/fix-usage.patch b/ports/geographiclib/fix-usage.patch new file mode 100644 index 000000000..9b558edf0 --- /dev/null +++ b/ports/geographiclib/fix-usage.patch @@ -0,0 +1,16 @@ +diff --git a/cmake/project-config-version.cmake.in b/cmake/project-config-version.cmake.in +index 1f207b8..d469658 100644 +--- a/cmake/project-config-version.cmake.in ++++ b/cmake/project-config-version.cmake.in +@@ -22,9 +22,9 @@ elseif (NOT (APPLE OR (NOT DEFINED CMAKE_SIZEOF_VOID_P) OR + # Reject if there's a mismatch in MSVC compiler versions + # set (REASON "_MSC_VER = @MSVC_VERSION@") + # set (PACKAGE_VERSION_UNSUITABLE TRUE) +-elseif (NOT CMAKE_CROSSCOMPILING STREQUAL "@CMAKE_CROSSCOMPILING@") ++elseif (NOT CMAKE_CROSSCOMPILING STREQUAL FALSE) + # Reject if there's a mismatch in ${CMAKE_CROSSCOMPILING} +- set (REASON "cross-compiling = @CMAKE_CROSSCOMPILING@") ++ set (REASON "cross-compiling = FALSE") + set (PACKAGE_VERSION_UNSUITABLE TRUE) + elseif (CMAKE_CROSSCOMPILING AND + NOT (CMAKE_SYSTEM_NAME STREQUAL "@CMAKE_SYSTEM_NAME@" AND diff --git a/ports/geographiclib/portfile.cmake b/ports/geographiclib/portfile.cmake index 95db365cf..e4fe5ad7a 100644 --- a/ports/geographiclib/portfile.cmake +++ b/ports/geographiclib/portfile.cmake @@ -1,19 +1,7 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - include(vcpkg_common_functions) vcpkg_download_distfile(ARCHIVE - URLS "https://jaist.dl.sourceforge.net/project/geographiclib/distrib/GeographicLib-1.47-patch1.zip" + URLS "https://jaist.dl.sourceforge.net/project/geographiclib/distrib/archive/GeographicLib-1.47-patch1.zip" FILENAME "geographiclib-1.47-patch1.zip" SHA512 d8fdfd7ae093057ec1a4ab922457fe71a3fb9975df5b673c276d62a0e9c4f212dc63652830b9d89e3890bc96aafd335992943cf6a1bce8260acf932d1eb7abfd ) @@ -22,6 +10,7 @@ vcpkg_extract_source_archive_ex( ARCHIVE ${ARCHIVE} PATCHES remove-tools-and-fix-version.patch + fix-usage.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) @@ -46,13 +35,16 @@ endif() vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/geographiclib) +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/GeographicLib) +endif() vcpkg_copy_pdbs() -file(COPY ${CURRENT_PACKAGES_DIR}/lib/pkgconfig DESTINATION ${CURRENT_PACKAGES_DIR}/share/geographiclib) +file(COPY ${CURRENT_PACKAGES_DIR}/lib/pkgconfig DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/00README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/geographiclib RENAME readme) -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/geographiclib RENAME copyright)
\ No newline at end of file +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/geographiclib/usage b/ports/geographiclib/usage new file mode 100644 index 000000000..7ba01a433 --- /dev/null +++ b/ports/geographiclib/usage @@ -0,0 +1,8 @@ +The package geographiclib:x64-linux provides CMake targets:
+
+ find_package(GeographicLib CONFIG REQUIRED)
+ #dynamic
+ target_link_libraries(main PRIVATE GeographicLib GeographicLib::GeographicLib)
+ #static
+ target_link_libraries(main PRIVATE GeographicLib_STATIC GeographicLib::GeographicLib_STATIC)
+
\ No newline at end of file |
