-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
153 lines (128 loc) · 5.05 KB
/
CMakeLists.txt
File metadata and controls
153 lines (128 loc) · 5.05 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
cmake_minimum_required(VERSION 3.16)
# ##################################################################################################
# Project Settings
# ##################################################################################################
project(QTemplateProject VERSION 0.1 LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 REQUIRED COMPONENTS Quick QuickControls2)
qt_standard_project_setup()
# ##################################################################################################
# Dependencies
# ##################################################################################################
# Flatten generation of all sub-dependent libraries
set(QT_QML_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/qml)
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/Backend)
# Add any include directories
#include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/Backend)
# Dependencies
add_subdirectory(QtQuickStream)
add_subdirectory(RoniaComponents)
# Extra QML File properties
set_source_files_properties(
Core/AppCore.qml
Core/AppSpec.qml
UiCore/AppStyle.qml
UiCore/AppSettings.qml
PROPERTIES
QT_QML_SINGLETON_TYPE True
)
# ##################################################################################################
# Project Files
# ##################################################################################################
# Executable Definition
qt_add_executable(appQTemplateProject
main.cpp
)
# Project Files
qt6_add_qml_module(appQTemplateProject
URI QTemplateProject
VERSION 1.0
QML_FILES
Main.qml
# Core
Core/AppCore.qml
Core/AppSpec.qml
Core/RootModel.qml
Core/I_Model.qml
Core/SelectionModel.qml
# Primitive Components
UiCore/Components/RoniaFlatButton.qml
UiCore/Components/RoniaTextIcon.qml
UiCore/Components/RoniaMenuItem.qml
UiCore/Components/RoniaThreeWaySwitch.qml
UiCore/Components/RoniaExpandableItem.qml
UiCore/Components/RoniaUserInputBase.qml
UiCore/Components/RoniaUserInputCombo.qml
UiCore/Components/RoniaUserInputNumberEditor.qml
UiCore/Components/RoniaUserInputTextField.qml
UiCore/Components/RoniaUserInputToggle.qml
UiCore/Components/RoniaToolTip.qml
UiCore/Components/RoniaNumberEditor.qml
UiCore/Components/RoniaComboBox.qml
UiCore/Components/RoniaColorButton.qml
UiCore/Components/RoniaContextMenu.qml
UiCore/Components/RoniaContextMenuItem.qml
UiCore/Components/RoniaRoundMouseArea.qml
UiCore/Components/Buttons/RoniaBaseButton.qml
UiCore/Components/Buttons/RoniaButton.qml
UiCore/Components/Buttons/RoniaIconButton.qml
UiCore/Components/Buttons/RoniaIconButtonRound.qml
UiCore/Components/Buttons/RoniaIconTextButton.qml
UiCore/Components/Buttons/RoniaSideMenuButton.qml
UiCore/Components/Buttons/RoniaControlToolButton.qml
# UiSession+Popups
UiCore/AppStyle.qml
UiCore/AppSettings.qml
UiCore/UiSession.qml
UiCore/UiSessionPopups.qml
UiCore/UiPreferences.qml
UiCore/PopUpLayout.qml
UiCore/PanelLayout.qml
UiCore/I_PopUp.qml
UiCore/I_Panel.qml
UiCore/PopUps/AboutPopUp.qml
UiCore/PopUps/ConfirmPopup.qml
UiCore/PopUps/SaveDialoge.qml
UiCore/PopUps/LoadDialoge.qml
UiCore/ShortcutManager.qml
# Widgets
View/MainView.qml
SOURCES
Backend/AppSpecCPP.h
Backend/AppSpecCPP.cpp
Backend/AppSettingsCPP.h
Backend/AppSettingsCPP.cpp
RESOURCES
Fonts/Font\ Awesome\ 6\ Pro-Thin-100.otf
Fonts/Font\ Awesome\ 6\ Pro-Solid-900.otf
Fonts/Font\ Awesome\ 6\ Pro-Regular-400.otf
Fonts/Font\ Awesome\ 6\ Pro-Light-300.otf
Fonts/RobotoMono-Regular.ttf
)
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
# If you are developing for iOS or macOS you should consider setting an
# explicit, fixed bundle identifier manually though.
set_target_properties(appQTemplateProject PROPERTIES
# MACOSX_BUNDLE_GUI_IDENTIFIER com.example.appQTemplateProject
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
MACOSX_BUNDLE TRUE
WIN32_EXECUTABLE TRUE
)
target_link_libraries(appQTemplateProject
PRIVATE Qt6::Quick Qt6::QuickControls2
QtQuickStreamplugin
RoniaComponentsplugin
)
include(GNUInstallDirs)
install(TARGETS appQTemplateProject
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
# ##################################################################################################
# Qt Creator Fixes
# ##################################################################################################
# Make Qt Creator aware of where the QML modules live
set(QML_IMPORT_PATH ${QT_QML_OUTPUT_DIRECTORY} CACHE STRING "QtCreator QML Modules Lookup")