-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
54 lines (46 loc) · 1.42 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
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
cmake_minimum_required(VERSION 3.5)
project(solar-car-dashboard)
# Find the required Qt packages
find_package(QT NAMES Qt5 Qt6 COMPONENTS Core Quick)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Quick REQUIRED)
message(----------QT-VERSION:${QT_VERSION_MAJOR}-----------)
# Set C++ standard to C++20
set(CMAKE_CXX_STANDARD 20)
# Add shared sources to build
set(SOURCES
${SOURCES}
backendprocesses.cpp
main.cpp
DataProcessor/DataUnpacker.cpp
DataProcessor/datafetcher.cpp
telemetrylib/TCP.cpp
telemetrylib/Telemetry.cpp
telemetrylib/SQL.cpp
gps/gps.cpp
3rdparty/serial/serialib.cpp
)
# Add the header files
set(HEADERS
${HEADERS}
DataProcessor/DataUnpacker.h
DataProcessor/datafetcher.h
backendprocesses.h
telemetrylib/Telemetry.h
telemetrylib/DTI.h
gps/gps.h
3rdparty/serial/serialib.h
)
# Add the resource files
qt_add_resources(RESOURCES
qml.qrc
UI/Images/images.qrc
UI/fonts/fonts.qrc
)
# Add the executable target
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS} ${RESOURCES})
# Link against the required Qt modules
target_link_libraries(${PROJECT_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Quick)
target_include_directories(${PROJECT_NAME} PRIVATE ./)