forked from danmar/cppcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgui.pro
220 lines (202 loc) · 6.14 KB
/
gui.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
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
lessThan(QT_MAJOR_VERSION, 5): error(requires >= Qt 5 (You used: $$QT_VERSION))
TEMPLATE = app
TARGET = cppcheck-gui
CONFIG += warn_on debug
DEPENDPATH += . \
../lib
INCLUDEPATH += . \
../lib
QT += widgets
QT += printsupport
QT += help
QT += network
# Build online help
onlinehelp.target = online-help.qhc
equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 12) {
# qcollectiongenerator is used in case of QT version < 5.12
onlinehelp.commands = qcollectiongenerator $$PWD/help/online-help.qhcp -o $$PWD/help/online-help.qhc
} else {
onlinehelp.commands = qhelpgenerator $$PWD/help/online-help.qhcp -o $$PWD/help/online-help.qhc
}
QMAKE_EXTRA_TARGETS += onlinehelp
PRE_TARGETDEPS += online-help.qhc
contains(LINKCORE, [yY][eE][sS]) {
LIBS += -l../bin/cppcheck-core
DEFINES += CPPCHECKLIB_IMPORT
}
LIBS += -L$$PWD/../externals
DESTDIR = .
RCC_DIR = temp
MOC_DIR = temp
OBJECTS_DIR = temp
UI_DIR = temp
isEmpty(QMAKE_CXX) {
isEmpty(CXX)) {
QMAKE_CXX = gcc
} else {
QMAKE_CXX = $$(CXX)
}
}
win32 {
CONFIG += windows
contains(LINKCORE, [yY][eE][sS]) {
DESTDIR = ../bin
RCC_DIR = temp/generated
MOC_DIR = temp/generated
OBJECTS_DIR = temp/generated
UI_DIR = temp/generated
} else {
DESTDIR = ../Build/gui
RCC_DIR = ../BuildTmp/gui
MOC_DIR = ../BuildTmp/gui
OBJECTS_DIR = ../BuildTmp/gui
UI_DIR = ../BuildTmp/gui
}
}
RESOURCES = gui.qrc
FORMS = about.ui \
applicationdialog.ui \
compliancereportdialog.ui \
fileview.ui \
helpdialog.ui \
mainwindow.ui \
projectfile.ui \
resultsview.ui \
scratchpad.ui \
settings.ui \
statsdialog.ui \
librarydialog.ui \
libraryaddfunctiondialog.ui \
libraryeditargdialog.ui \
newsuppressiondialog.ui
TRANSLATIONS = cppcheck_de.ts \
cppcheck_es.ts \
cppcheck_fi.ts \
cppcheck_fr.ts \
cppcheck_it.ts \
cppcheck_ja.ts \
cppcheck_ko.ts \
cppcheck_nl.ts \
cppcheck_ru.ts \
cppcheck_sr.ts \
cppcheck_sv.ts \
cppcheck_zh_CN.ts
# Windows-specific options
CONFIG += embed_manifest_exe
contains(LINKCORE, [yY][eE][sS]) {
} else {
BASEPATH = ../lib/
include($$PWD/../lib/lib.pri)
}
win32-msvc* {
MSVC_VER = $$(VisualStudioVersion)
message($$MSVC_VER)
MSVC_VER_SPLIT = $$split(MSVC_VER, .)
MSVC_VER_MAJOR = $$first(MSVC_VER_SPLIT)
# doesn't compile with older VS versions - assume VS2019 (16.x) is the first working for now
!lessThan(MSVC_VER_MAJOR, 16) {
message("using precompiled header")
CONFIG += precompile_header
PRECOMPILED_HEADER = precompiled_qmake.h
}
}
HEADERS += aboutdialog.h \
application.h \
applicationdialog.h \
applicationlist.h \
checkstatistics.h \
checkthread.h \
codeeditstylecontrols.h \
codeeditorstyle.h \
codeeditstyledialog.h \
codeeditor.h \
common.h \
compliancereportdialog.h \
csvreport.h \
erroritem.h \
filelist.h \
fileviewdialog.h \
helpdialog.h \
mainwindow.h \
platforms.h \
printablereport.h \
projectfile.h \
projectfiledialog.h \
report.h \
resultstree.h \
resultsview.h \
scratchpad.h \
settingsdialog.h \
showtypes.h \
statsdialog.h \
threadhandler.h \
threadresult.h \
translationhandler.h \
txtreport.h \
xmlreport.h \
xmlreportv2.h \
librarydialog.h \
cppchecklibrarydata.h \
libraryaddfunctiondialog.h \
libraryeditargdialog.h \
newsuppressiondialog.h
SOURCES += aboutdialog.cpp \
application.cpp \
applicationdialog.cpp \
applicationlist.cpp \
checkstatistics.cpp \
checkthread.cpp \
codeeditorstyle.cpp \
codeeditstylecontrols.cpp \
codeeditstyledialog.cpp \
codeeditor.cpp \
common.cpp \
compliancereportdialog.cpp \
csvreport.cpp \
erroritem.cpp \
filelist.cpp \
fileviewdialog.cpp \
helpdialog.cpp \
main.cpp \
mainwindow.cpp\
platforms.cpp \
printablereport.cpp \
projectfile.cpp \
projectfiledialog.cpp \
report.cpp \
resultstree.cpp \
resultsview.cpp \
scratchpad.cpp \
settingsdialog.cpp \
showtypes.cpp \
statsdialog.cpp \
threadhandler.cpp \
threadresult.cpp \
translationhandler.cpp \
txtreport.cpp \
xmlreport.cpp \
xmlreportv2.cpp \
librarydialog.cpp \
cppchecklibrarydata.cpp \
libraryaddfunctiondialog.cpp \
libraryeditargdialog.cpp \
newsuppressiondialog.cpp
win32 {
RC_FILE = cppcheck-gui.rc
HEADERS += ../lib/version.h
contains(LINKCORE, [yY][eE][sS]) {
} else {
LIBS += -lshlwapi
}
}
contains(QMAKE_CC, gcc) {
QMAKE_CXXFLAGS += -std=c++17 -pedantic -Wall -Wextra -Wcast-qual -Wno-deprecated-declarations -Wfloat-equal -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wundef -Wno-shadow -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare -Wno-multichar
}
contains(QMAKE_CXX, clang++) {
QMAKE_CXXFLAGS += -std=c++17 -pedantic -Wall -Wextra -Wcast-qual -Wno-deprecated-declarations -Wfloat-equal -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wundef -Wno-shadow -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare -Wno-multichar
}
contains(HAVE_QCHART, [yY][eE][sS]) {
QT += charts
} else {
message("Charts disabled - to enable it pass HAVE_QCHART=yes to qmake.")
}