diff options
| author | Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> | 2021-05-28 19:00:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-28 10:00:20 -0700 |
| commit | 0de461216d66a4d5ca1870254e27258a66f6e361 (patch) | |
| tree | 963314c8051cb74a061075b20f26aec6fd8a8952 /ports | |
| parent | 9d7244f2f6a4f6a34c4e0b3ecbf391323e379a43 (diff) | |
| download | vcpkg-0de461216d66a4d5ca1870254e27258a66f6e361.tar.gz vcpkg-0de461216d66a4d5ca1870254e27258a66f6e361.zip | |
[vcpkg.cmake] Cleanup every special case in the find_package override (#18047)
* move boost out of the toolchain
* move icu out of the toolchain
* remove CURL from the toolchain (was already unreachable?)
* remove gsl from toolchain
* remove grpc from toolchain
* version stuff
* fix indent and missing endif()
* version stuff
* Revert changes to vcpkg.cmake
* push port version
* version stuff
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/boost-uninstall/portfile.cmake | 2 | ||||
| -rw-r--r-- | ports/boost-uninstall/vcpkg-cmake-wrapper.cmake | 11 | ||||
| -rw-r--r-- | ports/boost-uninstall/vcpkg.json | 1 | ||||
| -rw-r--r-- | ports/curl/portfile.cmake | 2 | ||||
| -rw-r--r-- | ports/curl/vcpkg.json | 2 | ||||
| -rw-r--r-- | ports/grpc/portfile.cmake | 1 | ||||
| -rw-r--r-- | ports/grpc/vcpkg-cmake-wrapper.cmake | 2 | ||||
| -rw-r--r-- | ports/grpc/vcpkg.json | 2 | ||||
| -rw-r--r-- | ports/gsl/CONTROL | 1 | ||||
| -rw-r--r-- | ports/gsl/portfile.cmake | 1 | ||||
| -rw-r--r-- | ports/gsl/vcpkg-cmake-wrapper.cmake | 11 | ||||
| -rw-r--r-- | ports/icu/portfile.cmake | 1 | ||||
| -rw-r--r-- | ports/icu/vcpkg-cmake-wrapper.cmake | 6 | ||||
| -rw-r--r-- | ports/icu/vcpkg.json | 2 |
14 files changed, 41 insertions, 4 deletions
diff --git a/ports/boost-uninstall/portfile.cmake b/ports/boost-uninstall/portfile.cmake index a06925e40..07fa29731 100644 --- a/ports/boost-uninstall/portfile.cmake +++ b/ports/boost-uninstall/portfile.cmake @@ -2,3 +2,5 @@ set(VCPKG_POLICY_EMPTY_PACKAGE enabled) message(STATUS "\nPlease use the following command when you need to remove all boost ports/components:\n\
\"./vcpkg remove boost-uninstall:${TARGET_TRIPLET} --recurse\"\n")
+
+configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/boost/vcpkg-cmake-wrapper.cmake" @ONLY)
\ No newline at end of file diff --git a/ports/boost-uninstall/vcpkg-cmake-wrapper.cmake b/ports/boost-uninstall/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..d3e5109b2 --- /dev/null +++ b/ports/boost-uninstall/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,11 @@ +set(Boost_USE_STATIC_LIBS OFF)
+set(Boost_USE_MULTITHREADED ON)
+unset(Boost_USE_STATIC_RUNTIME)
+set(Boost_NO_BOOST_CMAKE ON)
+unset(Boost_USE_STATIC_RUNTIME CACHE)
+if("${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "v120")
+ set(Boost_COMPILER "-vc120")
+else()
+ set(Boost_COMPILER "-vc140")
+endif()
+_find_package(${ARGS})
\ No newline at end of file diff --git a/ports/boost-uninstall/vcpkg.json b/ports/boost-uninstall/vcpkg.json index f419d200f..09bef55d6 100644 --- a/ports/boost-uninstall/vcpkg.json +++ b/ports/boost-uninstall/vcpkg.json @@ -1,6 +1,7 @@ { "name": "boost-uninstall", "version-string": "1.75.0", + "port-version": 1, "description": "boost uninstall port", "homepage": "https://boost.org" } diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 21e813ab0..3512adeaf 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -145,5 +145,5 @@ endif() vcpkg_fixup_pkgconfig() -file(INSTALL ${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL "${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/curl/vcpkg.json b/ports/curl/vcpkg.json index e34124382..6efa34f0f 100644 --- a/ports/curl/vcpkg.json +++ b/ports/curl/vcpkg.json @@ -1,7 +1,7 @@ { "name": "curl", "version": "7.74.0", - "port-version": 6, + "port-version": 7, "description": "A library for transferring data with URLs", "homepage": "https://github.com/curl/curl", "dependencies": [ diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index e932c153c..3ec41fb2f 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -96,3 +96,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) diff --git a/ports/grpc/vcpkg-cmake-wrapper.cmake b/ports/grpc/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..9adf02880 --- /dev/null +++ b/ports/grpc/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,2 @@ +list(REMOVE_AT ARGS 0)
+_find_package(gRPC ${ARGS}) # Shouldn't this be fixed downstream instead of using a Wrapper?
\ No newline at end of file diff --git a/ports/grpc/vcpkg.json b/ports/grpc/vcpkg.json index a3515788e..118c58d18 100644 --- a/ports/grpc/vcpkg.json +++ b/ports/grpc/vcpkg.json @@ -1,7 +1,7 @@ { "name": "grpc", "version-semver": "1.37.0", - "port-version": 1, + "port-version": 2, "description": "An RPC library and framework", "homepage": "https://github.com/grpc/grpc", "dependencies": [ diff --git a/ports/gsl/CONTROL b/ports/gsl/CONTROL index 62c5efb26..03b3e6e74 100644 --- a/ports/gsl/CONTROL +++ b/ports/gsl/CONTROL @@ -1,4 +1,5 @@ Source: gsl Version: 2.6 +Port-Version: 1 Homepage: https://www.gnu.org/software/gsl/ Description: The GNU Scientific Library is a numerical library for C and C++ programmers diff --git a/ports/gsl/portfile.cmake b/ports/gsl/portfile.cmake index 3069c44b2..b722393fe 100644 --- a/ports/gsl/portfile.cmake +++ b/ports/gsl/portfile.cmake @@ -27,3 +27,4 @@ vcpkg_copy_pdbs() file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
\ No newline at end of file diff --git a/ports/gsl/vcpkg-cmake-wrapper.cmake b/ports/gsl/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..7a3ea854c --- /dev/null +++ b/ports/gsl/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,11 @@ +_find_package(${ARGS})
+if(GSL_FOUND AND TARGET GSL::gsl)
+ set_property( TARGET GSL::gslcblas APPEND PROPERTY IMPORTED_CONFIGURATIONS Release )
+ set_property( TARGET GSL::gsl APPEND PROPERTY IMPORTED_CONFIGURATIONS Release )
+ if( EXISTS "${GSL_LIBRARY_DEBUG}" AND EXISTS "${GSL_CBLAS_LIBRARY_DEBUG}")
+ set_property( TARGET GSL::gsl APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
+ set_target_properties( GSL::gsl PROPERTIES IMPORTED_LOCATION_DEBUG "${GSL_LIBRARY_DEBUG}" )
+ set_property( TARGET GSL::gslcblas APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
+ set_target_properties( GSL::gslcblas PROPERTIES IMPORTED_LOCATION_DEBUG "${GSL_CBLAS_LIBRARY_DEBUG}" )
+ endif()
+endif()
\ No newline at end of file diff --git a/ports/icu/portfile.cmake b/ports/icu/portfile.cmake index 32a8aea06..386982cd6 100644 --- a/ports/icu/portfile.cmake +++ b/ports/icu/portfile.cmake @@ -232,3 +232,4 @@ vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES pthread m) # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) diff --git a/ports/icu/vcpkg-cmake-wrapper.cmake b/ports/icu/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..7d7a818a0 --- /dev/null +++ b/ports/icu/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +list(FIND ARGS "COMPONENTS" COMPONENTS_IDX)
+if(NOT COMPONENTS_IDX EQUAL -1)
+ _find_package(${ARGS} COMPONENTS data)
+else()
+ _find_package(${ARGS})
+endif()
\ No newline at end of file diff --git a/ports/icu/vcpkg.json b/ports/icu/vcpkg.json index c20dc6920..88e82a08d 100644 --- a/ports/icu/vcpkg.json +++ b/ports/icu/vcpkg.json @@ -1,7 +1,7 @@ { "name": "icu", "version": "69.1", - "port-version": 9, + "port-version": 10, "description": "Mature and widely used Unicode and localization library.", "homepage": "http://icu-project.org/apiref/icu4c/", "supports": "!uwp", |
