-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
36 lines (25 loc) · 1.44 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
cmake_minimum_required(VERSION 3.9)
project(ep)
set(CMAKE_CXX_STANDARD 11)
aux_source_directory(./ ROOTSRC)
aux_source_directory(./ep EPSRC)
aux_source_directory(./NetModule NETSRC)
aux_source_directory(./Utils UTILSSRC)
aux_source_directory(./Utils/Logger LOGSRC)
aux_source_directory(./test/nQueen/nQueenServer NQSSRC)
aux_source_directory(./test/nQueen/nQueenClient NQCSRC)
include_directories(./ ./ep ./NetModule ./Utils ./Utils/Logger ./test/nQueen)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/build/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/build/lib)
add_library(ep SHARED ${ROOTSRC} ${EPSRC} ${NETSRC} ${UTILSSRC} ${LOGSRC} test/nQueen/nQueenServer/nQueenServerLogic.h test/nQueen/nQueenServer/nQueenServerLogic.cpp)
target_link_libraries(ep pthread)
add_executable(TCPServerTest ${ROOTSRC} ${EPSRC} ${NETSRC} ${UTILSSRC} ${LOGSRC} ./test/TCPServerTest.cpp)
target_link_libraries(TCPServerTest pthread)
add_executable(TCPClientTest ${ROOTSRC} ${EPSRC} ${NETSRC} ${UTILSSRC} ${LOGSRC} ./test/TCPClientTest.cpp)
target_link_libraries(TCPClientTest pthread)
add_executable(nQueenServer ${ROOTSRC} ${EPSRC} ${NETSRC} ${UTILSSRC} ${LOGSRC} ${NQSSRC} ./test/nQueen/ThreadSafeStruct.h)
target_link_libraries(nQueenServer pthread)
add_executable(nQueenClient ${ROOTSRC} ${EPSRC} ${NETSRC} ${UTILSSRC} ${LOGSRC} ${NQCSRC} ./test/nQueen/ThreadSafeStruct.h)
target_link_libraries(nQueenClient pthread)
install(TARGETS ep
LIBRARY DESTINATION lib)