-
Notifications
You must be signed in to change notification settings - Fork 9
/
CMakeLists.txt
46 lines (37 loc) · 1.19 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
cmake_minimum_required(VERSION 3.0)
project(Rover2017)
set(INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/install)
########## Qt Configuration ##########
# Point CMake to the Qt 5.7 location
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH}
"/opt/Qt/5.7/gcc_64"
"/opt/Qt5.7.0/5.7/gcc_64"
"~/Qt5.7.0/5.7/gcc_64"
"~/Qt/5.7/gcc_64"
"~/Qt5.7.0/5.7/gcc_64"
)
set(QML_IMPORT_PATH ${QML_IMPORT_PATH}
"/opt/Qt/5.7/gcc_64/qml"
"/opt/Qt5.7.0/5.7/gcc_64/qml"
"~/Qt5.7.0/5.7/gcc_64/qml"
"~/Qt/5.7/gcc_64/qml"
"~/Qt5.7.0/5.7/gcc_64/qml"
)
# Find the necessary Qt libraries
find_package(Qt5Widgets 5.7 REQUIRED)
find_package(Qt5Qml 5.7 REQUIRED)
find_package(Qt5Quick 5.7 REQUIRED)
find_package(Qt5SerialPort 5.7 REQUIRED)
find_package(Qt5QuickWidgets 5.7 REQUIRED)
find_package(Qt5WebEngine 5.7 REQUIRED)
find_package(Qt5QuickControls2 5.7 REQUIRED)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
# Automatically handle resource files
set(CMAKE_AUTORCC ON)
add_definitions(${Qt5Widgets_DEFINITIONS})
########## Subdirectories ##########
add_subdirectory(common)
add_subdirectory(base)