-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
65 lines (51 loc) · 1.54 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
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
cmake_minimum_required(VERSION 3.10)
project(bln_net)
find_package(Threads REQUIRED)
if (NOT TARGET bln_queue)
add_subdirectory(third_party/bln_queue)
endif()
option(BLN_NET_TESTS "Enable BLN Net Tests" OFF)
add_library(${PROJECT_NAME} "")
set_target_properties(${PROJECT_NAME} PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
)
target_sources(${PROJECT_NAME} PRIVATE
include/bln_net/types.hpp
include/bln_net/utils.hpp
include/bln_net/heartbeats.hpp
include/bln_net/local_endpoint.hpp
include/bln_net/local_packet.hpp
include/bln_net/local_socket.hpp
include/bln_net/local_socket_asio.hpp
include/bln_net/local_socket_hb.hpp
include/bln_net/udp_endpoint.hpp
include/bln_net/udp_packet.hpp
include/bln_net/udp_socket.hpp
include/bln_net/udp_socket_asio.hpp
include/bln_net/udp_socket_hb_srv.hpp
include/bln_net/udp_socket_hb_cli.hpp
src/local_packet.cpp
src/local_socket_asio.cpp
src/local_socket_hb.cpp
src/udp_endpoint.cpp
src/udp_packet.cpp
src/udp_socket_asio.cpp
src/udp_socket_hb_cli.cpp
src/udp_socket_hb_srv.cpp
src/utils.cpp
)
target_include_directories(${PROJECT_NAME} PUBLIC include)
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20)
if (UNIX)
target_compile_options(${PROJECT_NAME} PUBLIC -Wall -Wextra -pedantic)
endif (UNIX)
target_link_libraries(${PROJECT_NAME} PUBLIC
bln_queue
Threads::Threads
)
if (BLN_NET_TESTS)
add_subdirectory(test)
endif()
if (BLN_NET_EXAMPLES)
add_subdirectory(example)
endif()