forked from alanxz/rabbitmq-c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
43 lines (32 loc) · 984 Bytes
/
CMakeLists.txt
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
# © 2024 AO Kaspersky Lab
# Licensed under the MIT License
project(publisher)
find_package(OpenSSL REQUIRED)
find_package(Threads REQUIRED)
include(FetchContent)
FetchContent_Declare(rabbitmq SOURCE_DIR ${CMAKE_EXTERNAL_PREFIX})
FetchContent_MakeAvailable(rabbitmq)
if(PLATFORM_SUPPORTS_DYNAMIC_LINKING)
set(RABBITMQ_LIB rabbitmq::rabbitmq)
else()
set(RABBITMQ_LIB rabbitmq::rabbitmq-static)
endif()
nk_build_edl_files(publisher_edl_files
NK_MODULE "amqp"
EDL ${RESOURCES}/edl/Publisher.edl
)
add_executable(Publisher
src/main.cpp
src/publisher.cpp
${UTILS}/utils.cpp
)
target_compile_features(Publisher PUBLIC cxx_std_17)
target_compile_options(Publisher PUBLIC -fexceptions)
add_dependencies(Publisher publisher_edl_files)
target_include_directories(Publisher PUBLIC ${UTILS})
target_link_libraries(Publisher
${vfs_CLIENT_LIB}
${RABBITMQ_LIB}
${CMAKE_THREAD_LIBS_INIT}
)
set_target_properties(Publisher PROPERTIES ${vfs_ENTITY}_REPLACEMENT "")