-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
38 lines (27 loc) · 953 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
33
34
35
36
37
38
cmake_minimum_required (VERSION 3.5)
# default GNU install directories
include(GNUInstallDirs)
# set buil to debug
set(CMAKE_BUILD_TYPE Debug)
# set C++ standard to C++11
set (CMAKE_CXX_STANDARD 11)
# add local cmake dir to module path
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules)
# add Boost
find_package(Boost 1.58.0 REQUIRED)
include_directories(${Boost_INCLUDE_DIR})
# add PThread
find_package(PThread REQUIRED)
include_directories(${PTHREAD_INCLUDE_DIRS})
# add include directory
include_directories(include)
# source directories
add_subdirectory(lib)
add_subdirectory(gui)
add_subdirectory(cli)
# install idso1070.pc
install(FILES ${CMAKE_BINARY_DIR}/idso1070.pc DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
# install include directory
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/idso1070)
# Include uninstall target helper
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/uninstall.cmake")