-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
102 lines (75 loc) · 1.59 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
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
cmake_minimum_required(VERSION 3.16)
project(CusSuperV VERSION 0.1 LANGUAGES C CXX)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 17)
find_package(Qt6 6.2 COMPONENTS
Quick
GUi
Qml
Widgets
Core
LinguistTools
QuickControls2
REQUIRED)
find_package(glog CONFIG REQUIRED)
find_package(unofficial-breakpad CONFIG REQUIRED)
find_package(folly CONFIG REQUIRED)
#-----project----
file(GLOB
headfiles
guarantee/*h
template/*h
)
file(GLOB src
guarantee/*cpp
template/*cpp
)
file(
GLOB
asset_src
asset_src.qrc
)
# translations files
file(GLOB ts
assets/translations/de.ts
assets/translations/en.ts
assets/translations/ru.ts
assets/translations/en.ts
assets/translations/zh.ts
)
qt_create_translation(
TS_FILES ${CMAKE_SOURCE_DIR} ${ts}
)
set(
source
${headfiles}
${src}
${asset_src}
${TS_FILES}
)
qt_add_executable(appCusSuperV
main.cpp
${source}
)
#qt_add_qml_module(appCusSuperV //qt6 新加的 构建qml的qmldir autorcc qt_add_source 构建资源等qrc
# URI CusSuperV
# VERSION 1.0
# QML_FILES main.qml
#)
target_compile_definitions(appCusSuperV
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
target_link_libraries(appCusSuperV
PRIVATE
Qt6::Quick
Qt6::Gui
Qt6::Qml
Qt6::Widgets
Qt6::QuickControls2
unofficial::breakpad::libbreakpad
unofficial::breakpad::libbreakpad_client
glog::glog
Folly::folly
Folly::folly_deps
)