-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
66 lines (34 loc) · 1.14 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
52
53
54
55
56
57
58
59
60
61
62
cmake_minimum_required(VERSION 3.1.0)
project(TAWASOL)
# flags
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
if(CMAKE_VERSION VERSION_LESS "3.7.0")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
add_definitions(-DQT_NO_DEBUG_OUTPUT)
add_definitions(-DLOG_TO_FILE)
elseif(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
add_definitions(-DQT_NO_DEBUG_OUTPUT)
add_definitions(-DLOG_TO_FILE)
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
add_definitions(-DQT_NO_DEBUG_OUTPUT)
add_definitions(-DLOG_TO_FILE)
endif()
find_package(Qt5 COMPONENTS Widgets SerialPort REQUIRED)
# include files
include_directories(${Qt5Widgets_INCLUDE_DIRS})
set(LIB_DIR "./src"
CACHE PATH "The path to the Qt source files.")
set(RESOURCES_DIR "../resources"
CACHE PATH "The path to the resources directory.")
include_directories(${LIB_DIR}/gui
${LIB_DIR}/io
${LIB_DIR}/utils)
add_subdirectory(${LIB_DIR}/gui)
add_subdirectory(${LIB_DIR}/io)
add_subdirectory(${LIB_DIR}/utils)
add_subdirectory(app)