Skip to content

Commit f142f91

Browse files
committed
Add qmake files I used when I ran lupdate
1 parent 2d81d7d commit f142f91

File tree

2 files changed

+431
-0
lines changed

2 files changed

+431
-0
lines changed

gui/gui.pro

Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
lessThan(QT_MAJOR_VERSION, 6): error(requires >= Qt 6 (You used: $$QT_VERSION))
2+
3+
TEMPLATE = app
4+
TARGET = cppcheck-gui
5+
CONFIG += warn_on debug
6+
DEPENDPATH += . \
7+
../lib
8+
INCLUDEPATH += . \
9+
../lib
10+
QT += widgets
11+
QT += printsupport
12+
QT += help
13+
QT += network
14+
15+
# Build online help
16+
onlinehelp.target = online-help.qhc
17+
equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 12) {
18+
# qcollectiongenerator is used in case of QT version < 5.12
19+
onlinehelp.commands = qcollectiongenerator $$PWD/help/online-help.qhcp -o $$PWD/help/online-help.qhc
20+
} else {
21+
onlinehelp.commands = qhelpgenerator $$PWD/help/online-help.qhcp -o $$PWD/help/online-help.qhc
22+
}
23+
QMAKE_EXTRA_TARGETS += onlinehelp
24+
PRE_TARGETDEPS += online-help.qhc
25+
26+
contains(LINKCORE, [yY][eE][sS]) {
27+
LIBS += -l../bin/cppcheck-core
28+
DEFINES += CPPCHECKLIB_IMPORT
29+
}
30+
LIBS += -L$$PWD/../externals
31+
32+
DESTDIR = .
33+
RCC_DIR = temp
34+
MOC_DIR = temp
35+
OBJECTS_DIR = temp
36+
UI_DIR = temp
37+
38+
isEmpty(QMAKE_CXX) {
39+
isEmpty(CXX)) {
40+
QMAKE_CXX = gcc
41+
} else {
42+
QMAKE_CXX = $$(CXX)
43+
}
44+
}
45+
46+
win32 {
47+
CONFIG += windows
48+
contains(LINKCORE, [yY][eE][sS]) {
49+
DESTDIR = ../bin
50+
RCC_DIR = temp/generated
51+
MOC_DIR = temp/generated
52+
OBJECTS_DIR = temp/generated
53+
UI_DIR = temp/generated
54+
} else {
55+
DESTDIR = ../Build/gui
56+
RCC_DIR = ../BuildTmp/gui
57+
MOC_DIR = ../BuildTmp/gui
58+
OBJECTS_DIR = ../BuildTmp/gui
59+
UI_DIR = ../BuildTmp/gui
60+
}
61+
}
62+
63+
RESOURCES = gui.qrc
64+
FORMS = about.ui \
65+
applicationdialog.ui \
66+
compliancereportdialog.ui \
67+
fileview.ui \
68+
helpdialog.ui \
69+
mainwindow.ui \
70+
projectfile.ui \
71+
resultsview.ui \
72+
scratchpad.ui \
73+
settings.ui \
74+
statsdialog.ui \
75+
librarydialog.ui \
76+
libraryaddfunctiondialog.ui \
77+
libraryeditargdialog.ui \
78+
newsuppressiondialog.ui
79+
80+
TRANSLATIONS = cppcheck_de.ts \
81+
cppcheck_es.ts \
82+
cppcheck_fi.ts \
83+
cppcheck_fr.ts \
84+
cppcheck_it.ts \
85+
cppcheck_ja.ts \
86+
cppcheck_ka.ts \
87+
cppcheck_ko.ts \
88+
cppcheck_nl.ts \
89+
cppcheck_ru.ts \
90+
cppcheck_sr.ts \
91+
cppcheck_sv.ts \
92+
cppcheck_zh_CN.ts \
93+
cppcheck_zh_TW.ts
94+
95+
# Windows-specific options
96+
CONFIG += embed_manifest_exe
97+
98+
contains(LINKCORE, [yY][eE][sS]) {
99+
} else {
100+
BASEPATH = ../lib/
101+
include($$PWD/../lib/lib.pri)
102+
}
103+
104+
win32-msvc* {
105+
MSVC_VER = $$(VisualStudioVersion)
106+
message($$MSVC_VER)
107+
MSVC_VER_SPLIT = $$split(MSVC_VER, .)
108+
MSVC_VER_MAJOR = $$first(MSVC_VER_SPLIT)
109+
# doesn't compile with older VS versions - assume VS2019 (16.x) is the first working for now
110+
!lessThan(MSVC_VER_MAJOR, 16) {
111+
message("using precompiled header")
112+
CONFIG += precompile_header
113+
PRECOMPILED_HEADER = precompiled_qmake.h
114+
}
115+
}
116+
117+
HEADERS += aboutdialog.h \
118+
application.h \
119+
applicationdialog.h \
120+
applicationlist.h \
121+
checkstatistics.h \
122+
checkthread.h \
123+
codeeditstylecontrols.h \
124+
codeeditorstyle.h \
125+
codeeditstyledialog.h \
126+
codeeditor.h \
127+
common.h \
128+
compliancereportdialog.h \
129+
csvreport.h \
130+
erroritem.h \
131+
filelist.h \
132+
fileviewdialog.h \
133+
helpdialog.h \
134+
mainwindow.h \
135+
platforms.h \
136+
printablereport.h \
137+
projectfile.h \
138+
projectfiledialog.h \
139+
report.h \
140+
resultstree.h \
141+
resultsview.h \
142+
scratchpad.h \
143+
settingsdialog.h \
144+
showtypes.h \
145+
statsdialog.h \
146+
threadhandler.h \
147+
threadresult.h \
148+
translationhandler.h \
149+
txtreport.h \
150+
xmlreport.h \
151+
xmlreportv2.h \
152+
librarydialog.h \
153+
cppchecklibrarydata.h \
154+
libraryaddfunctiondialog.h \
155+
libraryeditargdialog.h \
156+
newsuppressiondialog.h
157+
158+
SOURCES += aboutdialog.cpp \
159+
application.cpp \
160+
applicationdialog.cpp \
161+
applicationlist.cpp \
162+
checkstatistics.cpp \
163+
checkthread.cpp \
164+
codeeditorstyle.cpp \
165+
codeeditstylecontrols.cpp \
166+
codeeditstyledialog.cpp \
167+
codeeditor.cpp \
168+
common.cpp \
169+
compliancereportdialog.cpp \
170+
csvreport.cpp \
171+
erroritem.cpp \
172+
filelist.cpp \
173+
fileviewdialog.cpp \
174+
helpdialog.cpp \
175+
main.cpp \
176+
mainwindow.cpp\
177+
platforms.cpp \
178+
printablereport.cpp \
179+
projectfile.cpp \
180+
projectfiledialog.cpp \
181+
report.cpp \
182+
resultstree.cpp \
183+
resultsview.cpp \
184+
scratchpad.cpp \
185+
settingsdialog.cpp \
186+
showtypes.cpp \
187+
statsdialog.cpp \
188+
threadhandler.cpp \
189+
threadresult.cpp \
190+
translationhandler.cpp \
191+
txtreport.cpp \
192+
xmlreport.cpp \
193+
xmlreportv2.cpp \
194+
librarydialog.cpp \
195+
cppchecklibrarydata.cpp \
196+
libraryaddfunctiondialog.cpp \
197+
libraryeditargdialog.cpp \
198+
newsuppressiondialog.cpp
199+
200+
win32 {
201+
RC_FILE = cppcheck-gui.rc
202+
HEADERS += ../lib/version.h
203+
contains(LINKCORE, [yY][eE][sS]) {
204+
} else {
205+
LIBS += -lshlwapi
206+
}
207+
}
208+
209+
contains(QMAKE_CC, gcc) {
210+
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
211+
}
212+
213+
contains(QMAKE_CXX, clang++) {
214+
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
215+
}
216+
217+
contains(HAVE_QCHART, [yY][eE][sS]) {
218+
QT += charts
219+
} else {
220+
message("Charts disabled - to enable it pass HAVE_QCHART=yes to qmake.")
221+
}
222+

0 commit comments

Comments
 (0)