-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwise.pro
More file actions
264 lines (240 loc) · 7.96 KB
/
wise.pro
File metadata and controls
264 lines (240 loc) · 7.96 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
macx {
dmg.commands = make install && hdiutil create Wise.d.dmg -srcfolder Wise.d
QMAKE_EXTRA_TARGETS += dmg
}
unix {
purge.commands = find . -name \'*~\' -exec rm {} \;
QMAKE_EXTRA_TARGETS += purge
}
CONFIG += qt release warn_on
DEFINES +=
LANGUAGE = C++
QMAKE_CLEAN += Wise
QT += concurrent gui network printsupport sql widgets
contains(QMAKE_HOST.arch, armv7l) {
QMAKE_CXXFLAGS_RELEASE += -march=armv7
}
qtHaveModule(pdf) {
qtHaveModule(pdfwidgets) {
QT += pdf pdfwidgets
} else {
error("The QtPdfWidgets module was not found.")
}
} else {
error("The QtPdf module was not found.")
}
QMAKE_CXXFLAGS_RELEASE += -O3
QMAKE_CXXFLAGS_RELEASE -= -O2
android {
QMAKE_CXXFLAGS_RELEASE += -Wall \
-Wcast-qual \
-Wenum-compare \
-Wextra \
-Wfloat-equal \
-Wformat=2 \
-Woverloaded-virtual \
-Wpointer-arith \
-Wstack-protector \
-Wstrict-overflow=1 \
-Wundef \
-fPIC \
-fstack-protector-all \
-funroll-loops \
-fwrapv \
-pedantic \
-std=c++20
} else:freebsd-* {
QMAKE_CXXFLAGS_RELEASE += -Wall \
-Wcast-align \
-Wcast-qual \
-Werror \
-Wextra \
-Wformat=2 \
-Woverloaded-virtual \
-Wpointer-arith \
-Wstack-protector \
-Wstrict-overflow=5 \
-Wundef \
-fPIE \
-fstack-protector-all \
-funroll-loops \
-fwrapv \
-pedantic \
-std=c++17
} else:macx {
QMAKE_CXXFLAGS_RELEASE += -Wall \
-Wcast-align \
-Wcast-qual \
-Wenum-compare \
-Wextra \
-Wformat=2 \
-Woverloaded-virtual \
-Wpointer-arith \
-Wstack-protector \
-Wstrict-overflow=5 \
-Wundef \
-fPIE \
-fstack-protector-all \
-funroll-loops \
-fwrapv \
-pedantic \
-std=c++17
QMAKE_MACOSX_DEPLOYMENT_TARGET = 12.0
} else:win32 {
QMAKE_CXXFLAGS_RELEASE += -Wall \
-Wcast-align \
-Wcast-qual \
-Wdouble-promotion \
-Wenum-compare \
-Wextra \
-Wformat=2 \
-Wl,-z,relro \
-Wno-class-memaccess \
-Wno-deprecated-copy \
-Woverloaded-virtual \
-Wpointer-arith \
-Wstack-protector \
-Wstrict-overflow=1 \
-Wundef \
-fPIE \
-funroll-loops \
-fwrapv \
-pedantic \
-pie \
-std=c++17
} else {
QMAKE_CXXFLAGS_RELEASE += -Wall \
-Wcast-qual \
-Wdouble-promotion \
-Wenum-compare \
-Wextra \
-Wfloat-equal \
-Wformat=2 \
-Wformat-overflow=2 \
-Wl,-z,relro \
-Wlogical-op \
-Wno-class-memaccess \
-Wno-deprecated-copy \
-Wold-style-cast \
-Woverloaded-virtual \
-Wpointer-arith \
-Wstack-protector \
-Wstrict-overflow=5 \
-Wstringop-overflow=4 \
-Wundef \
-fPIE \
-fstack-protector-all \
-funroll-loops \
-fwrapv \
-pedantic \
-pie \
-std=c++17
contains(QMAKE_HOST.arch, ppc) {
QMAKE_CXXFLAGS_RELEASE -= -Wformat-overflow=2 \
-Wstringop-overflow=4
}
}
greaterThan(QT_MAJOR_VERSION, 5) {
QMAKE_CXXFLAGS_RELEASE += -std=c++17
QMAKE_CXXFLAGS_RELEASE -= -std=c++11
}
macx {
QMAKE_DISTCLEAN += -r Wise.d
}
win32 {
QMAKE_DISTCLEAN += del /F /Q .qmake* \
rmdir /Q /S Temporary \
rmdir /Q /S debug \
rmdir /Q /S release
} else {
QMAKE_DISTCLEAN += -f .qmake* \
-fr Temporary
}
QMAKE_STRIP = echo
macx {
ICON = Icons/Logo/wise-logo.icns
}
win32 {
RC_FILE = Icons/wise.rc
}
INCLUDEPATH += Source
macx {
LIBS += -framework AppKit -framework Cocoa
OBJECTIVE_HEADERS += Source/CocoaInitializer.h
OBJECTIVE_SOURCES += Source/CocoaInitializer.mm
} else {
LIBS +=
}
MOC_DIR = Temporary/moc
OBJECTS_DIR = Temporary/obj
RCC_DIR = Temporary/rcc
RESOURCES = Documentation/documentation.qrc Icons/icons.qrc
UI_DIR = Temporary/ui
FORMS += UI/wise.ui \
UI/wise-pdf-view.ui \
UI/wise-settings.ui
HEADERS += Source/wise.h \
Source/wise-pdf-view.h \
Source/wise-recent-files-view.h \
Source/wise-settings.h \
Source/wise-tab.h \
Source/wise-tab-bar.h
SOURCES += Source/wise.cc \
Source/wise-main.cc \
Source/wise-pdf-view.cc \
Source/wise-recent-files-view.cc \
Source/wise-settings.cc \
Source/wise-tab.cc \
Source/wise-tab-bar.cc
TRANSLATIONS =
PROJECTNAME = Wise
TARGET = Wise
TEMPLATE = app
android {
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/Android
DISTFILES += Android/AndroidManifest.xml \
Android/build.gradle \
Android/res/values/libs.xml
android: include(/home/saturn/Android/Sdk/android_openssl/openssl.pri)
}
# Installation Procedures
macx {
macdeployqt.extra = $$[QT_INSTALL_BINS]/macdeployqt Wise.d/Wise.app \
-executable=Wise.d/Wise.app/Contents/MacOS/Wise
macdeployqt.path = Wise.app
preinstall.extra = rm -fr Wise.d/Wise.app
preinstall.path = Wise.d
INSTALLS = preinstall \
macdeployqt
}
win32 {
plugins.files = $$[QT_INSTALL_PLUGINS]\\*
plugins.path = release\\plugins\\.
qt.files = Qt\\qt.conf
qt.path = release\\.
qtlibraries.files = $$[QT_INSTALL_BINS]\\Qt6Core.dll \
$$[QT_INSTALL_BINS]\\Qt6Gui.dll \
$$[QT_INSTALL_BINS]\\Qt6Network.dll \
$$[QT_INSTALL_BINS]\\Qt6Pdf.dll \
$$[QT_INSTALL_BINS]\\Qt6PrintSupport.dll \
$$[QT_INSTALL_BINS]\\Qt6Sql.dll \
$$[QT_INSTALL_BINS]\\Qt6Widgets.dll \
$$[QT_INSTALL_BINS]\\libgcc_s_seh-1.dll \
$$[QT_INSTALL_BINS]\\libstdc++-6.dll \
$$[QT_INSTALL_BINS]\\libwinpthread-1.dll
qtlibraries.path = release\\.
INSTALLS = plugins \
qt \
qtlibraries
}
android {
DISTFILES += Android/AndroidManifest.xml \
Android/build.gradle \
Android/gradle.properties \
Android/gradle/wrapper/gradle-wrapper.jar \
Android/gradle/wrapper/gradle-wrapper.properties \
Android/gradlew \
Android/gradlew.bat \
Android/res/values/libs.xml \
Android/res/xml/qtprovider_paths.xml
}