-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
130 lines (108 loc) · 3.22 KB
/
CMakeLists.txt
File metadata and controls
130 lines (108 loc) · 3.22 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
PROJECT(dtests-proton-cpp)
set(PROTON_DIR /usr CACHE STRING "QPID Proton base directory")
include_directories(
${PROTON_DIR}/include
common
.
)
if (${DTEST_BUILD_PLATFORM} EQUAL "64")
link_directories(
${PROTON_DIR}/lib64
)
else(${DTEST_BUILD_PLATFORM} EQUAL "64")
link_directories(
${PROTON_DIR}/lib
)
endif(${DTEST_BUILD_PLATFORM} EQUAL "64")
if (UNIX AND ProtonCpp_VERSION VERSION_GREATER_EQUAL 0.38.0)
set(OPENTELEMETRY_ENABLED ON)
set(MODERNClient_tracing_src common/ModernClient_tracing_opentracing.cpp)
else ()
set(OPENTELEMETRY_ENABLED OFF)
set(MODERNClient_tracing_src common/ModernClient_tracing_none.cpp)
endif ()
cmake_policy(SET CMP0003 NEW)
add_library(
dtests-proton-common
common/ModernClient.cpp
${MODERNClient_tracing_src}
)
if (WIN32)
target_link_libraries(
dtests-proton-common
dtests-cpp-contrib
dtests-cpp-common
dtests-cpp-common-options
)
else (WIN32)
target_link_libraries(
dtests-proton-common
dtests-cpp-contrib
dtests-cpp-common
dtests-cpp-common-options
)
endif (WIN32)
cmake_policy(SET CMP0003 NEW)
add_library(
dtests-proton-reactor
reactor/formatter/ReactorDecoder.cpp
reactor/handler/CommonHandler.cpp
reactor/handler/ConnectorHandler.cpp
reactor/handler/SenderHandler.cpp
reactor/handler/TxSenderHandler.cpp
reactor/handler/ReceiverHandler.cpp
reactor/handler/TxReceiverHandler.cpp
reactor/ConnectingClient.cpp
reactor/SendingClient.cpp
reactor/TxSendingClient.cpp
reactor/ReceivingClient.cpp
reactor/TxReceivingClient.cpp
)
target_link_libraries(
dtests-proton-reactor
dtests-cpp-contrib
dtests-cpp-common
dtests-cpp-common-options
dtests-proton-common
# Proton::cpp
qpid-proton-cpp
)
if (OPENTELEMETRY_ENABLED)
set(CMAKE_BUILD_TYPE "")
# This is a workaround because the otlp exporter requires protobuf but most packaged versions
# of protobuf don't ship cmake config yet. We use this exporter in our examples
find_package(Protobuf REQUIRED)
find_package(opentelemetry-cpp REQUIRED)
include_directories(${OPENTELEMETRY_CPP_INCLUDE_DIRS})
target_link_libraries(dtests-proton-reactor
opentelemetry-cpp::trace
opentelemetry-cpp::otlp_http_exporter
)
endif ()
set(proton-reactor-clients
aac3_connector
aac3_sender
aac3_receiver
)
foreach(client ${proton-reactor-clients})
cmake_policy(SET CMP0003 NEW)
add_executable(${client}
clients/${client}.cpp
)
target_link_libraries(${client}
dtests-proton-reactor
)
endforeach(client)
install(TARGETS
dtests-proton-common
dtests-proton-reactor
${proton-reactor-clients}
LIBRARY DESTINATION ${CPP_LIBRARY_DIR}
RUNTIME DESTINATION ${CPP_RUNTIME_DIR}
ARCHIVE DESTINATION ${CPP_LIBRARY_DIR}
)
InstallHeaders(src/api/qpid-proton qpid-proton)
InstallHeaders(src/api/qpid-proton/common qpid-proton/common)
InstallHeaders(src/api/qpid-proton/reactor qpid-proton/reactor)
InstallHeaders(src/api/qpid-proton/reactor/formatter qpid-proton/reactor/formatter)
InstallHeaders(src/api/qpid-proton/reactor/handler qpid-proton/reactor/handler)