diff options
Diffstat (limited to 'vcpkg/ports/oatpp-curl/fix-find-curl.patch')
| -rw-r--r-- | vcpkg/ports/oatpp-curl/fix-find-curl.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/vcpkg/ports/oatpp-curl/fix-find-curl.patch b/vcpkg/ports/oatpp-curl/fix-find-curl.patch new file mode 100644 index 0000000..bd17629 --- /dev/null +++ b/vcpkg/ports/oatpp-curl/fix-find-curl.patch @@ -0,0 +1,51 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 85edfe7..a8aa02b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -94,7 +94,7 @@ message("## ${OATPP_THIS_MODULE_NAME} module. Resolving dependencies...\n") + + ############################## + ## Find libcurl dependency +- ++if(0) + include(FindPkgConfig) + pkg_check_modules(PKG_CURL REQUIRED libcurl) + +@@ -103,9 +103,10 @@ message("[libcurl] LIBRARIES=${PKG_CURL_LIBRARIES}") + message("[libcurl] LIBRARY_DIRS=${PKG_CURL_LIBRARY_DIRS}") + message("[libcurl] INCLUDE_DIRS=${PKG_CURL_INCLUDE_DIRS}") + message("[libcurl] VERSION=${PKG_CURL_VERSION}\n") +- ++endif() ++find_package(CURL CONFIG REQUIRED) + link_directories( +- ${PKG_CURL_LIBRARY_DIRS} ++ CURL::libcurl + ) + + message("\n############################################################################\n") +diff --git a/cmake/module-config.cmake.in b/cmake/module-config.cmake.in +index 5cc12b0..4ff34bc 100644 +--- a/cmake/module-config.cmake.in ++++ b/cmake/module-config.cmake.in +@@ -1,5 +1,6 @@ + @PACKAGE_INIT@ +- ++include(CMakeFindDependencyMacro) ++find_dependency(CURL) + if(NOT TARGET oatpp::@OATPP_MODULE_NAME@) + include("${CMAKE_CURRENT_LIST_DIR}/@OATPP_MODULE_NAME@Targets.cmake") + endif() +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 8c2087f..1da41c6 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -43,7 +43,7 @@ target_include_directories(${OATPP_THIS_MODULE_NAME} + #) + + target_link_libraries(${OATPP_THIS_MODULE_NAME} +- PRIVATE ${PKG_CURL_LIBRARIES} ++ PRIVATE CURL::libcurl + ) + + ####################################################################################################### |