2022-04-22 00:06:18 +08:00
|
|
|
diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt
|
2023-04-07 08:28:45 +08:00
|
|
|
index 27b40e7..81de970 100644
|
2022-04-22 00:06:18 +08:00
|
|
|
--- a/c/CMakeLists.txt
|
|
|
|
+++ b/c/CMakeLists.txt
|
2023-04-07 08:28:45 +08:00
|
|
|
@@ -377,8 +377,13 @@ if (PROACTOR STREQUAL "iocp" OR (NOT PROACTOR AND NOT PROACTOR_OK))
|
2022-07-09 04:02:45 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if (PROACTOR STREQUAL "libuv" OR (NOT PROACTOR AND NOT PROACTOR_OK))
|
|
|
|
- find_package(Libuv)
|
|
|
|
+ find_package(Libuv NAMES libuv CONFIG)
|
|
|
|
if (Libuv_FOUND)
|
2023-06-28 08:07:58 +08:00
|
|
|
+ if (TARGET libuv::uv)
|
|
|
|
+ add_library(Libuv::Libuv ALIAS libuv::uv)
|
2022-07-09 04:02:45 +08:00
|
|
|
+ else()
|
2023-06-28 08:07:58 +08:00
|
|
|
+ add_library(Libuv::Libuv ALIAS libuv::uv_a)
|
2022-07-09 04:02:45 +08:00
|
|
|
+ endif()
|
2023-04-07 08:28:45 +08:00
|
|
|
set (PROACTOR_OK libuv)
|
|
|
|
set (qpid-proton-proactor src/proactor/libuv.c ${qpid-proton-proactor-common})
|
|
|
|
set (PROACTOR_LIBS Libuv::Libuv)
|
|
|
|
@@ -727,11 +732,6 @@ install (FILES
|
2022-04-22 00:06:18 +08:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/ProtonConfig.cmake
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/ProtonConfigVersion.cmake
|
|
|
|
DESTINATION ${LIB_INSTALL_DIR}/cmake/Proton)
|
|
|
|
-install (FILES
|
|
|
|
- ../tools/cmake/Modules/FindCyrusSASL.cmake
|
|
|
|
- ../tools/cmake/Modules/FindOpenSSL.cmake
|
|
|
|
- ../tools/cmake/Modules/FindThreads.cmake
|
|
|
|
- DESTINATION ${LIB_INSTALL_DIR}/cmake/Proton)
|
|
|
|
|
|
|
|
if (ENABLE_BENCHMARKS)
|
|
|
|
add_subdirectory(benchmarks)
|
2022-07-09 04:02:45 +08:00
|
|
|
diff --git a/c/src/ProtonConfig.cmake.in b/c/src/ProtonConfig.cmake.in
|
2023-04-07 08:28:45 +08:00
|
|
|
index 3eca7bc..fe27234 100644
|
2022-04-22 00:06:18 +08:00
|
|
|
--- a/c/src/ProtonConfig.cmake.in
|
|
|
|
+++ b/c/src/ProtonConfig.cmake.in
|
2023-04-07 08:28:45 +08:00
|
|
|
@@ -23,7 +23,7 @@
|
2022-04-22 00:06:18 +08:00
|
|
|
# URL: http://qpid.apache.org/proton/
|
|
|
|
|
|
|
|
@PACKAGE_INIT@
|
|
|
|
-if (NOT Proton_USE_STATIC_LIBS)
|
2023-04-07 08:28:45 +08:00
|
|
|
+if ("1")
|
2022-04-22 00:06:18 +08:00
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/ProtonTargets.cmake")
|
|
|
|
else()
|
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/ProtonTargetsStatic.cmake")
|
2023-04-07 08:28:45 +08:00
|
|
|
@@ -32,9 +32,8 @@ endif()
|
2022-04-22 00:06:18 +08:00
|
|
|
set(Proton_VERSION @PN_VERSION@)
|
|
|
|
|
|
|
|
# find dependencies, because static libs don't transitively pull them
|
|
|
|
-if (Proton_USE_STATIC_LIBS)
|
2023-04-07 08:28:45 +08:00
|
|
|
+if ("1")
|
|
|
|
set(CMAKE_MODULE_PATH_OLD ${CMAKE_MODULE_PATH})
|
2022-04-22 00:06:18 +08:00
|
|
|
- set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
|
|
|
|
|
|
|
set(CyrusSASL_FOUND @CyrusSASL_FOUND@)
|
|
|
|
if (CyrusSASL_FOUND)
|
2022-07-09 04:02:45 +08:00
|
|
|
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
|
2023-04-07 08:28:45 +08:00
|
|
|
index 2049fe9..3dc8a06 100644
|
2022-07-09 04:02:45 +08:00
|
|
|
--- a/cpp/CMakeLists.txt
|
|
|
|
+++ b/cpp/CMakeLists.txt
|
2023-04-07 08:28:45 +08:00
|
|
|
@@ -26,10 +26,10 @@ find_package(Threads)
|
2022-07-09 04:02:45 +08:00
|
|
|
include(versions.cmake)
|
2022-04-22 00:06:18 +08:00
|
|
|
|
2022-07-09 04:02:45 +08:00
|
|
|
# Check for JSON-CPP support for connection configuration
|
|
|
|
-find_package(JsonCpp)
|
2023-04-07 08:28:45 +08:00
|
|
|
option(ENABLE_JSONCPP "Use jsoncpp parser for connection configuration" ${JsonCpp_FOUND})
|
2022-07-09 04:02:45 +08:00
|
|
|
if (ENABLE_JSONCPP)
|
|
|
|
- include_directories(${JsonCpp_INCLUDE_DIRS})
|
2023-04-07 08:28:45 +08:00
|
|
|
+ find_package(JsonCpp NAMES jsoncpp CONFIG REQUIRED)
|
|
|
|
+ set(JsonCpp_LIBRARY JsonCpp::JsonCpp)
|
2022-07-09 04:02:45 +08:00
|
|
|
set(CONNECT_CONFIG_SRC src/connect_config.cpp)
|
2023-04-07 08:28:45 +08:00
|
|
|
set(CONNECT_CONFIG_LIBS ${JsonCpp_LIBRARY})
|
2022-07-09 04:02:45 +08:00
|
|
|
else()
|
|
|
|
diff --git a/cpp/ProtonCppConfig.cmake.in b/cpp/ProtonCppConfig.cmake.in
|
2023-04-07 08:28:45 +08:00
|
|
|
index aaa1bf9..e1be025 100644
|
2022-04-22 00:06:18 +08:00
|
|
|
--- a/cpp/ProtonCppConfig.cmake.in
|
|
|
|
+++ b/cpp/ProtonCppConfig.cmake.in
|
2022-07-09 04:02:45 +08:00
|
|
|
@@ -23,7 +23,9 @@
|
2022-04-22 00:06:18 +08:00
|
|
|
# URL: http://qpid.apache.org/proton/
|
|
|
|
|
|
|
|
@PACKAGE_INIT@
|
|
|
|
-if (NOT ProtonCpp_USE_STATIC_LIBS)
|
|
|
|
+include(CMakeFindDependencyMacro)
|
|
|
|
+find_dependency(Proton CONFIG)
|
|
|
|
+if (1)
|
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/ProtonCppTargets.cmake")
|
|
|
|
else()
|
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/ProtonCppTargetsStatic.cmake")
|