-
Notifications
You must be signed in to change notification settings - Fork 24
/
QtApp.pro
115 lines (88 loc) · 2.7 KB
/
QtApp.pro
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
#-------------------------------------------------------------------------------
# Make options
#-------------------------------------------------------------------------------
UI_DIR = uic
MOC_DIR = moc
RCC_DIR = qrc
OBJECTS_DIR = obj
CONFIG += c++11
#-------------------------------------------------------------------------------
# Qt configuration
#-------------------------------------------------------------------------------
TEMPLATE = app
TARGET = QtApp
CONFIG += qtc_runnable
CONFIG += resources_big
CONFIG += qtquickcompiler
QT += xml
QT += sql
QT += svg
QT += core
QT += quick
QT += widgets
QT += quickcontrols2
QTPLUGIN += qsvg
#-------------------------------------------------------------------------------
# Compiler options
#-------------------------------------------------------------------------------
*g++*: {
QMAKE_CXXFLAGS_RELEASE -= -O
QMAKE_CXXFLAGS_RELEASE *= -O3
}
*msvc*: {
QMAKE_CXXFLAGS_RELEASE -= /O
QMAKE_CXXFLAGS_RELEASE *= /O2
}
#-------------------------------------------------------------------------------
# Libraries
#-------------------------------------------------------------------------------
include(libs/Libraries.pri)
#-------------------------------------------------------------------------------
# Deploy options
#-------------------------------------------------------------------------------
win32* {
RC_FILE = deploy/windows/resources/info.rc
}
macx* {
ICON = deploy/macOS/icon.icns
RC_FILE = deploy/macOS/icon.icns
QMAKE_INFO_PLIST = deploy/macOS/info.plist
CONFIG += sdk_no_version_check # To avoid warnings with Big Sur
}
linux:!android {
TARGET = qt-app
target.path = /usr/bin
icon.path = /usr/share/pixmaps
desktop.path = /usr/share/applications
icon.files += deploy/linux/*.png
desktop.files += deploy/linux/*.desktop
INSTALLS += target desktop icon
}
#-------------------------------------------------------------------------------
# Import source code
#-------------------------------------------------------------------------------
INCLUDEPATH += $$PWD/src
RESOURCES += \
assets/assets.qrc
DISTFILES += \
assets/qml/*.qml
TRANSLATIONS += \
assets/translations/en.ts \
assets/translations/es.ts \
assets/translations/zh.ts
HEADERS += \
src/AppInfo.h \
src/Misc/Utilities.h \
src/Misc/Translator.h
SOURCES += \
src/Misc/Utilities.cpp \
src/Misc/Translator.cpp \
src/main.cpp
#-------------------------------------------------------------------------------
# Deploy files
#-------------------------------------------------------------------------------
OTHER_FILES += \
deploy/linux/* \
deploy/macOS/* \
deploy/windows/nsis/* \
deploy/windows/resources/*