package An official xmake package repository
https://xrepo.xmake.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.6 KiB
42 lines
1.6 KiB
diff --git a/CMakeLists.txt b/CMakeLists.txt |
|
index c2610db..abee1c8 100644 |
|
--- a/CMakeLists.txt |
|
+++ b/CMakeLists.txt |
|
@@ -57,15 +57,16 @@ endif() |
|
# ------------ |
|
|
|
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(curlpp REQUIRED IMPORTED_TARGET curlpp) |
|
+pkg_search_module(inih REQUIRED IMPORTED_TARGET inih) |
|
find_package(nlohmann_json CONFIG REQUIRED) |
|
find_package(pugixml CONFIG REQUIRED) |
|
find_package(ZLIB REQUIRED) |
|
|
|
list(APPEND MINIO_CPP_LIBS |
|
- unofficial::curlpp::curlpp |
|
- unofficial::inih::inireader |
|
+ PkgConfig::curlpp CURL::libcurl PkgConfig::inih |
|
nlohmann_json::nlohmann_json |
|
pugixml |
|
OpenSSL::SSL OpenSSL::Crypto |
|
@@ -115,7 +116,7 @@ set(MINIO_CPP_HEADERS |
|
include/miniocpp/utils.h |
|
) |
|
|
|
-add_library(miniocpp STATIC ${MINIO_CPP_SOURCES} ${MINIO_CPP_HEADERS}) |
|
+add_library(miniocpp ${MINIO_CPP_SOURCES} ${MINIO_CPP_HEADERS}) |
|
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 |
|
) |
|
target_link_libraries(miniocpp PUBLIC ${MINIO_CPP_LIBS}) |
|
set_target_properties(miniocpp PROPERTIES VERSION "${MINIO_CPP_VERSION_STRING}") |
|
-set_target_properties(miniocpp PROPERTIES POSITION_INDEPENDENT_CODE ON) |
|
|
|
# Add a cmake alias - this is how users should use minio-cpp in their cmake projects. |
|
add_library(miniocpp::miniocpp ALIAS miniocpp)
|
|
|