-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
51 lines (46 loc) · 1.5 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
cmake_minimum_required(VERSION 3.5)
project(Sphere-Linked)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so")
add_executable(sphere-linked-server
server/main.cpp
server/config.hpp
server/config.cpp
server/connection.cpp
server/connection.hpp
server/message.cpp
server/message.hpp
server/shared.cpp
server/shared.hpp
server/opt.cpp
server/opt.hpp
server/socket_management.cpp
server/socket_management.hpp
)
add_executable(sphere-linked-client
client/main.cpp
client/message.cpp
client/message.hpp
client/config.hpp
client/connection.cpp
client/connection.hpp
client/shared.cpp
client/shared.hpp
client/opt.cpp
client/opt.hpp
client/socket_management.cpp
client/socket_management.hpp
)
find_package(Threads)
target_link_libraries(sphere-linked-server PRIVATE Threads::Threads)
target_link_libraries(sphere-linked-client PRIVATE Threads::Threads)
target_link_libraries(sphere-linked-server PRIVATE ${CMAKE_DL_LIBS})
target_link_libraries(sphere-linked-client PRIVATE ${CMAKE_DL_LIBS})
set(OPENSSL_USE_STATIC_LIBS TRUE)
find_package(OpenSSL REQUIRED)
target_link_libraries(sphere-linked-server PRIVATE OpenSSL::SSL)
target_link_libraries(sphere-linked-client PRIVATE OpenSSL::SSL)
if (UNIX AND NOT APPLE)
find_library(UUID_LIB uuid REQUIRED)
target_link_libraries(sphere-linked-server PRIVATE ${UUID_LIB})
endif()