1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
Description: Fix cmake dependencies
Use bundled ctre (not packaged now), use correct msgpack library name
Author: Shengqi Chen <harry@debian.org>
Forwarded: not-needed
Last-Update: 2025-02-12
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -88,16 +88,16 @@
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
-if (REFLECTCPP_USE_BUNDLED_DEPENDENCIES)
+#if (REFLECTCPP_USE_BUNDLED_DEPENDENCIES)
target_include_directories(
reflectcpp PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/rfl/thirdparty>)
-else ()
- if (NOT TARGET ctre::ctre)
- find_package(ctre CONFIG REQUIRED)
- endif ()
- target_link_libraries(reflectcpp PUBLIC ctre::ctre)
-endif ()
+#else ()
+# if (NOT TARGET ctre::ctre)
+# find_package(ctre CONFIG REQUIRED)
+# endif ()
+# target_link_libraries(reflectcpp PUBLIC ctre::ctre)
+#endif ()
if (REFLECTCPP_JSON)
list(APPEND REFLECT_CPP_SOURCES
@@ -124,7 +124,6 @@
list(APPEND REFLECT_CPP_SOURCES
src/reflectcpp_avro.cpp
)
- find_package(jansson CONFIG REQUIRED)
if (REFLECTCPP_USE_VCPKG)
target_include_directories(reflectcpp SYSTEM PRIVATE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include")
if (MSVC)
@@ -137,27 +136,29 @@
pkg_check_modules(avro REQUIRED IMPORTED_TARGET avro-c)
target_link_libraries(reflectcpp PUBLIC PkgConfig::avro)
endif ()
- target_link_libraries(reflectcpp PRIVATE jansson::jansson)
endif ()
if (REFLECTCPP_BSON)
list(APPEND REFLECT_CPP_SOURCES
src/reflectcpp_bson.cpp
)
- if (NOT TARGET mongo::bson_static AND NOT TARGET mongo::bson_shared)
+ if (NOT TARGET mongo::bson_shared)
find_package(bson-1.0 CONFIG REQUIRED)
endif ()
- target_link_libraries(reflectcpp PUBLIC $<IF:$<TARGET_EXISTS:mongo::bson_static>,mongo::bson_static,mongo::bson_shared>)
+ target_link_libraries(reflectcpp PUBLIC mongo::bson_shared)
endif ()
if (REFLECTCPP_CAPNPROTO)
list(APPEND REFLECT_CPP_SOURCES
src/reflectcpp_capnproto.cpp
)
- if (NOT TARGET CapnProto)
- find_package(CapnProto CONFIG REQUIRED)
- endif ()
- target_link_libraries(reflectcpp PUBLIC CapnProto::kj CapnProto::capnp CapnProto::capnpc CapnProto::kj-gzip)
+ # if (NOT TARGET CapnProto)
+ # find_package(CapnProto CONFIG REQUIRED) # see bug #1095942
+ # endif ()
+ # target_link_libraries(reflectcpp PUBLIC CapnProto::kj CapnProto::capnp CapnProto::capnpc CapnProto::kj-gzip)
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(capnp REQUIRED IMPORTED_TARGET capnp kj capnpc kj-gzip)
+ target_link_libraries(reflectcpp PUBLIC PkgConfig::capnp)
endif ()
if (REFLECTCPP_CBOR)
|