-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
40 lines (33 loc) · 1.06 KB
/
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
cmake_minimum_required(VERSION 3.22)
project(zrpc)
set(CMAKE_EXPORT_COMPILE_COMMANDS on)
set(CMAKE_CXX_STANDARD 23)
option(BUILD_EXAMPLES on)
find_package(ZeroMQ REQUIRED)
find_package(cppzmq CONFIG REQUIRED)
find_package(spdlog REQUIRED)
find_package(fmt REQUIRED)
find_package(nameof REQUIRED)
find_package(magic_enum REQUIRED)
#find_package(Boost COMPONENTS pfr)
add_definitions(-DZMQ_BUILD_DRAFT_API=1)
add_definitions(-DZMQ_HAVE_POLLER=1)
set(LIBS
cppzmq-static
libzmq-static
fmt::fmt-header-only
spdlog::spdlog_header_only
magic_enum::magic_enum
nameof::nameof
)
if (BUILD_EXAMPLES)
add_executable(server examples/server.cc)
target_include_directories(server PRIVATE include)
target_link_libraries(server ${LIBS})
add_executable(client examples/client.cc)
target_include_directories(client PRIVATE include)
target_link_libraries(client ${LIBS})
add_executable(msgpack_test examples/msgpack_test.cc)
target_include_directories(msgpack_test PRIVATE include)
target_link_libraries(msgpack_test ${LIBS})
endif()