aports/testing/porla/cmake.libraries.patch
2024-12-05 20:53:03 +00:00

46 lines
1.6 KiB
Diff

build using available dependencies from system
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 30bdb3e..699f82e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,19 +35,17 @@ find_package(Lua REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(SQLite3 REQUIRED)
find_package(ZLIB REQUIRED)
+find_package(libzip REQUIRED)
+find_package(tomlplusplus REQUIRED)
+find_package(uriparser REQUIRED)
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(curl REQUIRED IMPORTED_TARGET libcurl)
-FetchContent_Declare(curl URL https://github.com/curl/curl/archive/refs/tags/curl-8_6_0.tar.gz)
FetchContent_Declare(jwt-cpp URL https://github.com/Thalhammer/jwt-cpp/archive/refs/tags/v0.7.0.tar.gz)
-FetchContent_Declare(libzip URL https://github.com/nih-at/libzip/archive/refs/tags/v1.10.1.tar.gz)
-FetchContent_Declare(tomlplusplus URL https://github.com/marzer/tomlplusplus/archive/refs/tags/v3.4.0.tar.gz)
-FetchContent_Declare(uriparser URL https://github.com/uriparser/uriparser/archive/refs/tags/uriparser-0.9.7.tar.gz)
FetchContent_MakeAvailable(
- curl
jwt-cpp
- libzip
- tomlplusplus
- uriparser)
+)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.cpp
@@ -244,10 +242,11 @@ target_link_libraries(
${PROJECT_NAME}_utils
Boost::boost Boost::log Boost::program_options
- CURL::libcurl
+ PkgConfig::curl
jwt-cpp::jwt-cpp
libzip::zip
- lua
+ ZLIB::ZLIB
+ ${LUA_LIBRARIES}
sodium
SQLite::SQLite3
torrent-rasterbar