]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/paho-mqttpp3/fix-dependency.patch
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / paho-mqttpp3 / fix-dependency.patch
1 diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
2 index a9f8908..5c98f3f 100644
3 --- a/cmake/CMakeLists.txt
4 +++ b/cmake/CMakeLists.txt
5 @@ -17,6 +17,5 @@ install(EXPORT ${package_name} DESTINATION lib/cmake/${package_name}
6
7 install(FILES
8 "${CMAKE_CURRENT_BINARY_DIR}/${package_name}Config.cmake"
9 - FindPahoMqttC.cmake
10 "${CMAKE_CURRENT_BINARY_DIR}/${package_name}ConfigVersion.cmake"
11 DESTINATION lib/cmake/${package_name})
12 diff --git a/cmake/PahoMqttCppConfig.cmake.in b/cmake/PahoMqttCppConfig.cmake.in
13 index 164e123..9beac1c 100644
14 --- a/cmake/PahoMqttCppConfig.cmake.in
15 +++ b/cmake/PahoMqttCppConfig.cmake.in
16 @@ -5,7 +5,7 @@ set(PAHO_WITH_SSL @PAHO_WITH_SSL@)
17
18 include(CMakeFindDependencyMacro)
19 list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
20 -find_dependency(PahoMqttC REQUIRED)
21 +find_dependency(eclipse-paho-mqtt-c REQUIRED)
22 list(REMOVE_AT CMAKE_MODULE_PATH -1)
23 find_dependency(Threads REQUIRED)
24
25 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
26 index 3d43595..a25f74d 100644
27 --- a/src/CMakeLists.txt
28 +++ b/src/CMakeLists.txt
29 @@ -23,7 +23,7 @@
30 # Frank Pagliughi - made the shared library optional
31 #*******************************************************************************/
32
33 -find_package(PahoMqttC REQUIRED)
34 +find_package(eclipse-paho-mqtt-c CONFIG REQUIRED)
35
36 # --- The headers ---
37
38 @@ -81,13 +81,21 @@ target_include_directories(paho-cpp-objs
39 ## --- Build the shared library, if requested ---
40
41 if(PAHO_BUILD_SHARED)
42 + ## set PAHO_C_LIB
43 + if(PAHO_WITH_SSL)
44 + find_package(OpenSSL REQUIRED)
45 + set(_PAHO_MQTT_C_LIB_NAME eclipse-paho-mqtt-c::paho-mqtt3as eclipse-paho-mqtt-c::paho-mqtt3cs)
46 + else()
47 + set(_PAHO_MQTT_C_LIB_NAME eclipse-paho-mqtt-c::paho-mqtt3a eclipse-paho-mqtt-c::paho-mqtt3c)
48 + endif()
49 +
50 ## create the shared library
51 add_library(paho-mqttpp3 SHARED $<TARGET_OBJECTS:paho-cpp-objs>)
52
53 ## add dependencies to the shared library
54 target_link_libraries(paho-mqttpp3
55 PRIVATE ${LIBS_SYSTEM}
56 - PUBLIC PahoMqttC::PahoMqttC Threads::Threads)
57 + PUBLIC ${_PAHO_MQTT_C_LIB_NAME} Threads::Threads)
58
59 # It would be nice to exort the include paths from the obj lib, but we
60 # get an export error. Perhaps in a future version?
61 @@ -119,13 +127,22 @@ endif()
62 ## --- Build static version of the library, if requested ---
63
64 if(PAHO_BUILD_STATIC)
65 +
66 + ## set PAHO_C_LIB
67 + if(PAHO_WITH_SSL)
68 + find_package(OpenSSL REQUIRED)
69 + set(_PAHO_MQTT_C_LIB_NAME eclipse-paho-mqtt-c::paho-mqtt3as-static eclipse-paho-mqtt-c::paho-mqtt3cs-static)
70 + else()
71 + set(_PAHO_MQTT_C_LIB_NAME eclipse-paho-mqtt-c::paho-mqtt3a-static eclipse-paho-mqtt-c::paho-mqtt3c-static)
72 + endif()
73 +
74 ## create the static library
75 add_library(paho-mqttpp3-static STATIC $<TARGET_OBJECTS:paho-cpp-objs>)
76
77 ## add dependencies to the shared library
78 target_link_libraries(paho-mqttpp3-static
79 PRIVATE ${LIBS_SYSTEM}
80 - PUBLIC PahoMqttC::PahoMqttC Threads::Threads)
81 + PUBLIC ${_PAHO_MQTT_C_LIB_NAME} Threads::Threads)
82
83 target_include_directories(paho-mqttpp3-static PUBLIC
84 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>