use pkgconfig to find openssl3

pull/5019/head
star9029 7 months ago
parent 385d15bc31
commit b6f2ed815b
  1. 21
      packages/m/minio-cpp/patches/0.3.0/cmake-pkgconfig-find-deps.patch
  2. 5
      packages/m/minio-cpp/xmake.lua

@ -1,15 +1,17 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c2610db..abee1c8 100644
index c2610db..8019638 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,15 +57,16 @@ endif()
@@ -56,19 +56,19 @@ endif()
# Dependencies
# ------------
find_package(OpenSSL REQUIRED)
-find_package(OpenSSL REQUIRED)
-find_package(unofficial-curlpp CONFIG REQUIRED)
-find_package(unofficial-inih CONFIG REQUIRED)
+find_package(CURL REQUIRED)
+include(FindPkgConfig)
+pkg_search_module(openssl3 REQUIRED IMPORTED_TARGET openssl3)
+find_package(CURL REQUIRED)
+pkg_search_module(curlpp REQUIRED IMPORTED_TARGET curlpp)
+pkg_search_module(inih REQUIRED IMPORTED_TARGET inih)
find_package(nlohmann_json CONFIG REQUIRED)
@ -19,11 +21,14 @@ index c2610db..abee1c8 100644
list(APPEND MINIO_CPP_LIBS
- unofficial::curlpp::curlpp
- unofficial::inih::inireader
+ PkgConfig::curlpp CURL::libcurl PkgConfig::inih
+ PkgConfig::curlpp CURL::libcurl PkgConfig::openssl3 PkgConfig::inih
nlohmann_json::nlohmann_json
pugixml
OpenSSL::SSL OpenSSL::Crypto
@@ -115,7 +116,7 @@ set(MINIO_CPP_HEADERS
- OpenSSL::SSL OpenSSL::Crypto
ZLIB::ZLIB
)
@@ -115,7 +115,7 @@ set(MINIO_CPP_HEADERS
include/miniocpp/utils.h
)
@ -32,7 +37,7 @@ index c2610db..abee1c8 100644
target_compile_options(miniocpp PRIVATE ${MINIO_CPP_CFLAGS})
target_compile_features(miniocpp PUBLIC cxx_std_${MINIO_CPP_STD})
target_include_directories(miniocpp PUBLIC
@@ -124,7 +125,6 @@ target_include_directories(miniocpp PUBLIC
@@ -124,7 +124,6 @@ target_include_directories(miniocpp PUBLIC
)
target_link_libraries(miniocpp PUBLIC ${MINIO_CPP_LIBS})
set_target_properties(miniocpp PROPERTIES VERSION "${MINIO_CPP_VERSION_STRING}")

@ -8,13 +8,16 @@ package("minio-cpp")
add_versions("v0.3.0", "da0f2f54bf169ad9e5e9368cc9143df4db056fc5c05bb55d8c1d9065e7211f7c")
add_patches("0.3.0", "patches/0.3.0/cmake-pkgconfig-find-deps.patch", "53a0a5a300c896ad92dbaf3b96fa25556a2f555e84ce07deb7b7b1562ddac9e5")
add_patches("0.3.0", "patches/0.3.0/cmake-pkgconfig-find-deps.patch", "15cc2958571e8c92b452bf6b96f04a3eb5320267b873b5d94d1cea77464b456b")
add_patches("0.3.0", "patches/0.3.0/macos-unistd.patch", "cd50e5d3cb5ceda7d606dc15f90ab4764b34a61a96a3be83f02688329843ef1f")
add_deps("cmake")
if is_host("windows") then
add_deps("pkgconf")
else
add_deps("pkg-config")
end
add_deps("nlohmann_json", {configs = {cmake = true}})
add_deps("inih", {configs = {ini_parser = true}})
add_deps("openssl3", "curlpp", "pugixml", "zlib")

Loading…
Cancel
Save