-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
47 lines (38 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
41
42
43
44
45
46
# minimum cmake version requirement
cmake_minimum_required(VERSION 3.10)
# set project name
project(radlet_dock)
# set compiler c++ standard
set(CMAKE_CXX_STANDARD 17)
# set binary output directory
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
# Disable in-source builds to prevent source tree corruption.
if(" ${CMAKE_SOURCE_DIR}" STREQUAL " ${CMAKE_BINARY_DIR}")
message(FATAL_ERROR "
FATAL: In-source builds are not allowed.
You should create a separate build directory for build files.
")
endif()
# find libraries
find_package( Boost 1.52 COMPONENTS system thread regex REQUIRED )
find_package( Protobuf REQUIRED )
find_package( rxcpp CONFIG REQUIRED)
# 3rd party lib sub_directories
add_subdirectory(
${CMAKE_SOURCE_DIR}/protos
)
add_subdirectory(
${CMAKE_SOURCE_DIR}/libs/cpr
)
# include 3rd party header files
include_directories(
${CMAKE_SOURCE_DIR}/libs/crow/inc
${CMAKE_SOURCE_DIR}/libs/sqlite3pp/inc
${Boost_INCLUDE_DIR}
${Protobuf_INCLUDE_DIRS}
${CPR_INCLUDE_DIRS}
)
# source sub_directory
add_subdirectory(
${CMAKE_SOURCE_DIR}/src
)