forked from NTUSTcs1091/Group5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
32 lines (26 loc) · 964 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
cmake_minimum_required(VERSION 3.3)
project (Group5)
# set default variable
option(Boost_USE_STATIC_LIBS "Use static library." ON)
option(Boost_USE_MULTITHREAD "Use multithread" ON)
option(Boost_USE_STATIC_RUNTIME "Use static runtime" ON)
option(Boost_USE_DEBUG_RUNTIME "Use debug runtime" ON)
# find boost library date_time
find_package(Boost REQUIRED COMPONENTS system thread regex)
IF(Boost_FOUND)
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
LINK_DIRECTORIES(${Boost_LIBRARY_DIR})
ENDIF(Boost_FOUND)
find_package(OpenSSL)
if (OPENSSL_FOUND)
link_libraries(${OPENSSL_LIBRARIES})
include_directories (${OPENSSL_INCLUDE_DIR})
endif()
if (MSVC)
# set run-time mode
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wall -Wextra -Wpedantic -Wno-unused-parameter")
endif()
add_subdirectory (src)