diff options
| author | Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> | 2021-08-10 08:30:02 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-09 17:30:02 -0700 |
| commit | dd462392f4651dcbce3051225a20b161035bef5e (patch) | |
| tree | 3272a147371f9454b8d3f2a23efb86389a901b9f /ports | |
| parent | f9389d05c61e221330cdb08a7d56d511b4afed37 (diff) | |
| download | vcpkg-dd462392f4651dcbce3051225a20b161035bef5e.tar.gz vcpkg-dd462392f4651dcbce3051225a20b161035bef5e.zip | |
[proj4] Add usage, fixup target PROJ::proj (#19298)
* [proj4] Export target both proj and proj4
* version
* fix the generated cmake file name
* Fix config.cmake
* version
* update
* Update ports/proj4/usage
* Update versions/p-/proj4.json
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/proj4/portfile.cmake | 33 | ||||
| -rw-r--r-- | ports/proj4/usage | 4 | ||||
| -rw-r--r-- | ports/proj4/vcpkg.json | 10 |
3 files changed, 32 insertions, 15 deletions
diff --git a/ports/proj4/portfile.cmake b/ports/proj4/portfile.cmake index e0880683a..feff73e4f 100644 --- a/ports/proj4/portfile.cmake +++ b/ports/proj4/portfile.cmake @@ -22,14 +22,15 @@ else() endif() vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - database BUILD_PROJ_DATABASE - tools BUILD_CCT - tools BUILD_CS2CS - tools BUILD_GEOD - tools BUILD_GIE - tools BUILD_PROJ - tools BUILD_PROJINFO - ${EXTRA_FEATURES} + FEATURES + database BUILD_PROJ_DATABASE + tools BUILD_CCT + tools BUILD_CS2CS + tools BUILD_GEOD + tools BUILD_GIE + tools BUILD_PROJ + tools BUILD_PROJINFO + ${EXTRA_FEATURES} ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") @@ -41,7 +42,7 @@ if ("database" IN_LIST FEATURES) set(EXE_SQLITE3 ${CURRENT_HOST_INSTALLED_DIR}/tools/sqlite3${VCPKG_HOST_EXECUTABLE_SUFFIX}) endif() -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS ${FEATURE_OPTIONS} @@ -52,15 +53,19 @@ vcpkg_configure_cmake( -DEXE_SQLITE3=${EXE_SQLITE3} ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(PACKAGE_NAME PROJ CONFIG_PATH lib/cmake/proj DO_NOT_DELETE_PARENT_CONFIG_PATH) +vcpkg_cmake_config_fixup(PACKAGE_NAME PROJ4 CONFIG_PATH lib/cmake/proj4) + if ("tools" IN_LIST FEATURES) vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN) endif () -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +configure_file("${CURRENT_PORT_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/proj4/usage b/ports/proj4/usage new file mode 100644 index 000000000..a2297ca02 --- /dev/null +++ b/ports/proj4/usage @@ -0,0 +1,4 @@ +The package ${PORT}:${TARGET_TRIPLET} provides CMake targets: + + find_package(PROJ CONFIG REQUIRED) + target_link_libraries(main PRIVATE PROJ::proj) diff --git a/ports/proj4/vcpkg.json b/ports/proj4/vcpkg.json index a6c8f8b43..234f92494 100644 --- a/ports/proj4/vcpkg.json +++ b/ports/proj4/vcpkg.json @@ -1,13 +1,21 @@ { "name": "proj4", "version-string": "7.2.1", - "port-version": 2, + "port-version": 3, "description": "PROJ.4 library for cartographic projections", "homepage": "https://github.com/OSGeo/PROJ", "dependencies": [ { "name": "sqlite3", "default-features": false + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true } ], "default-features": [ |
