2017-08-13 13:38:47 +02:00
|
|
|
lessThan(QT_MAJOR_VERSION, 5): error(requires >= Qt 5 (You used: $$QT_VERSION))
|
|
|
|
|
2011-04-02 19:16:18 +02:00
|
|
|
TEMPLATE = app
|
|
|
|
TARGET = cppcheck-gui
|
2014-01-18 08:50:22 +01:00
|
|
|
CONFIG += warn_on debug
|
2011-04-02 19:16:18 +02:00
|
|
|
DEPENDPATH += . \
|
|
|
|
../lib
|
|
|
|
INCLUDEPATH += . \
|
2022-04-11 07:30:55 +02:00
|
|
|
../lib
|
2017-08-13 13:38:47 +02:00
|
|
|
QT += widgets
|
|
|
|
QT += printsupport
|
2020-07-20 11:59:28 +02:00
|
|
|
QT += help
|
2022-10-09 18:51:01 +02:00
|
|
|
QT += network
|
2013-07-13 09:16:15 +02:00
|
|
|
|
2020-07-20 12:43:08 +02:00
|
|
|
# Build online help
|
2020-10-18 08:07:27 +02:00
|
|
|
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
|
2020-07-20 12:43:08 +02:00
|
|
|
|
2012-10-06 21:23:52 +02:00
|
|
|
contains(LINKCORE, [yY][eE][sS]) {
|
|
|
|
LIBS += -l../bin/cppcheck-core
|
|
|
|
DEFINES += CPPCHECKLIB_IMPORT
|
|
|
|
}
|
2022-04-11 07:30:55 +02:00
|
|
|
LIBS += -L$$PWD/../externals
|
2020-02-04 21:20:43 +01:00
|
|
|
|
2011-04-02 19:16:18 +02:00
|
|
|
DESTDIR = .
|
|
|
|
RCC_DIR = temp
|
|
|
|
MOC_DIR = temp
|
|
|
|
OBJECTS_DIR = temp
|
|
|
|
UI_DIR = temp
|
|
|
|
|
2017-08-03 21:07:25 +02:00
|
|
|
isEmpty(QMAKE_CXX) {
|
|
|
|
isEmpty(CXX)) {
|
|
|
|
QMAKE_CXX = gcc
|
|
|
|
} else {
|
|
|
|
QMAKE_CXX = $$(CXX)
|
|
|
|
}
|
|
|
|
}
|
2017-08-03 17:38:42 +02:00
|
|
|
|
2011-04-02 19:16:18 +02:00
|
|
|
win32 {
|
2012-04-26 20:48:17 +02:00
|
|
|
CONFIG += windows
|
2012-10-06 21:23:52 +02:00
|
|
|
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
|
|
|
|
}
|
2011-04-02 19:16:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
RESOURCES = gui.qrc
|
2011-04-04 13:18:28 +02:00
|
|
|
FORMS = about.ui \
|
2022-03-19 19:54:20 +01:00
|
|
|
applicationdialog.ui \
|
2023-01-30 14:59:45 +01:00
|
|
|
compliancereportdialog.ui \
|
2022-03-19 19:54:20 +01:00
|
|
|
fileview.ui \
|
2020-08-25 19:58:52 +02:00
|
|
|
helpdialog.ui \
|
2016-11-19 23:07:48 +01:00
|
|
|
mainwindow.ui \
|
2022-03-19 19:54:20 +01:00
|
|
|
projectfile.ui \
|
2011-04-04 13:18:28 +02:00
|
|
|
resultsview.ui \
|
2012-10-20 20:14:52 +02:00
|
|
|
scratchpad.ui \
|
2011-04-04 13:18:28 +02:00
|
|
|
settings.ui \
|
2022-03-19 19:54:20 +01:00
|
|
|
statsdialog.ui \
|
2016-11-19 22:54:32 +01:00
|
|
|
librarydialog.ui \
|
|
|
|
libraryaddfunctiondialog.ui \
|
2018-04-09 06:43:48 +02:00
|
|
|
libraryeditargdialog.ui \
|
2022-04-11 07:30:55 +02:00
|
|
|
newsuppressiondialog.ui
|
2011-04-02 19:16:18 +02:00
|
|
|
|
2011-04-06 08:56:26 +02:00
|
|
|
TRANSLATIONS = cppcheck_de.ts \
|
|
|
|
cppcheck_es.ts \
|
2011-04-06 08:49:17 +02:00
|
|
|
cppcheck_fi.ts \
|
2011-04-02 19:16:18 +02:00
|
|
|
cppcheck_fr.ts \
|
2012-09-16 13:21:46 +02:00
|
|
|
cppcheck_it.ts \
|
2011-04-06 08:56:26 +02:00
|
|
|
cppcheck_ja.ts \
|
2012-07-28 15:10:39 +02:00
|
|
|
cppcheck_ko.ts \
|
2011-04-02 19:16:18 +02:00
|
|
|
cppcheck_nl.ts \
|
|
|
|
cppcheck_ru.ts \
|
2011-04-06 08:56:26 +02:00
|
|
|
cppcheck_sr.ts \
|
2012-12-18 17:23:41 +01:00
|
|
|
cppcheck_sv.ts \
|
2023-06-04 07:51:48 +02:00
|
|
|
cppcheck_zh_CN.ts \
|
|
|
|
cppcheck_zh_TW.ts
|
2011-04-02 19:16:18 +02:00
|
|
|
|
|
|
|
# Windows-specific options
|
|
|
|
CONFIG += embed_manifest_exe
|
|
|
|
|
2012-10-06 21:23:52 +02:00
|
|
|
contains(LINKCORE, [yY][eE][sS]) {
|
|
|
|
} else {
|
|
|
|
BASEPATH = ../lib/
|
|
|
|
include($$PWD/../lib/lib.pri)
|
|
|
|
}
|
2011-04-02 19:16:18 +02:00
|
|
|
|
2020-09-13 23:06:45 +02:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
2020-06-17 17:20:44 +02:00
|
|
|
|
2011-04-04 13:18:28 +02:00
|
|
|
HEADERS += aboutdialog.h \
|
|
|
|
application.h \
|
2011-04-02 19:16:18 +02:00
|
|
|
applicationdialog.h \
|
2011-04-04 13:18:28 +02:00
|
|
|
applicationlist.h \
|
|
|
|
checkstatistics.h \
|
|
|
|
checkthread.h \
|
2019-06-23 19:04:53 +02:00
|
|
|
codeeditstylecontrols.h \
|
2019-06-08 07:23:48 +02:00
|
|
|
codeeditorstyle.h \
|
2019-06-23 19:04:53 +02:00
|
|
|
codeeditstyledialog.h \
|
2018-02-17 22:24:41 +01:00
|
|
|
codeeditor.h \
|
2011-04-02 19:16:18 +02:00
|
|
|
common.h \
|
2023-01-30 14:59:45 +01:00
|
|
|
compliancereportdialog.h \
|
2011-04-04 13:18:28 +02:00
|
|
|
csvreport.h \
|
2011-04-02 19:16:18 +02:00
|
|
|
erroritem.h \
|
2011-04-04 13:18:28 +02:00
|
|
|
filelist.h \
|
2011-04-02 19:16:18 +02:00
|
|
|
fileviewdialog.h \
|
2020-08-25 19:58:52 +02:00
|
|
|
helpdialog.h \
|
2011-04-04 13:18:28 +02:00
|
|
|
mainwindow.h \
|
2011-10-02 21:08:12 +02:00
|
|
|
platforms.h \
|
2015-04-17 16:33:52 +02:00
|
|
|
printablereport.h \
|
2011-04-02 19:16:18 +02:00
|
|
|
projectfile.h \
|
|
|
|
projectfiledialog.h \
|
|
|
|
report.h \
|
2011-04-04 13:18:28 +02:00
|
|
|
resultstree.h \
|
|
|
|
resultsview.h \
|
2012-10-20 20:14:52 +02:00
|
|
|
scratchpad.h \
|
2011-04-04 13:18:28 +02:00
|
|
|
settingsdialog.h \
|
2011-12-27 20:13:16 +01:00
|
|
|
showtypes.h \
|
2011-04-04 13:18:28 +02:00
|
|
|
statsdialog.h \
|
|
|
|
threadhandler.h \
|
|
|
|
threadresult.h \
|
|
|
|
translationhandler.h \
|
2011-04-02 19:16:18 +02:00
|
|
|
txtreport.h \
|
|
|
|
xmlreport.h \
|
2015-09-04 20:46:26 +02:00
|
|
|
xmlreportv2.h \
|
2018-04-09 06:43:48 +02:00
|
|
|
librarydialog.h \
|
|
|
|
cppchecklibrarydata.h \
|
|
|
|
libraryaddfunctiondialog.h \
|
|
|
|
libraryeditargdialog.h \
|
2019-06-28 22:36:19 +02:00
|
|
|
newsuppressiondialog.h
|
2011-04-02 19:16:18 +02:00
|
|
|
|
2011-04-04 13:18:28 +02:00
|
|
|
SOURCES += aboutdialog.cpp \
|
|
|
|
application.cpp \
|
2011-04-02 19:16:18 +02:00
|
|
|
applicationdialog.cpp \
|
2011-04-04 13:18:28 +02:00
|
|
|
applicationlist.cpp \
|
|
|
|
checkstatistics.cpp \
|
|
|
|
checkthread.cpp \
|
2019-06-23 19:04:53 +02:00
|
|
|
codeeditorstyle.cpp \
|
|
|
|
codeeditstylecontrols.cpp \
|
|
|
|
codeeditstyledialog.cpp \
|
2018-02-17 22:24:41 +01:00
|
|
|
codeeditor.cpp \
|
2013-02-08 16:18:05 +01:00
|
|
|
common.cpp \
|
2023-01-30 14:59:45 +01:00
|
|
|
compliancereportdialog.cpp \
|
2011-04-04 13:18:28 +02:00
|
|
|
csvreport.cpp \
|
|
|
|
erroritem.cpp \
|
|
|
|
filelist.cpp \
|
2011-04-02 19:16:18 +02:00
|
|
|
fileviewdialog.cpp \
|
2020-08-25 19:58:52 +02:00
|
|
|
helpdialog.cpp \
|
2011-04-04 13:18:28 +02:00
|
|
|
main.cpp \
|
|
|
|
mainwindow.cpp\
|
2011-10-02 21:08:12 +02:00
|
|
|
platforms.cpp \
|
2015-04-17 16:33:52 +02:00
|
|
|
printablereport.cpp \
|
2011-04-02 19:16:18 +02:00
|
|
|
projectfile.cpp \
|
|
|
|
projectfiledialog.cpp \
|
|
|
|
report.cpp \
|
2011-04-04 13:18:28 +02:00
|
|
|
resultstree.cpp \
|
|
|
|
resultsview.cpp \
|
2012-10-20 20:14:52 +02:00
|
|
|
scratchpad.cpp \
|
2011-04-04 13:18:28 +02:00
|
|
|
settingsdialog.cpp \
|
2011-12-27 20:13:16 +01:00
|
|
|
showtypes.cpp \
|
2011-04-04 13:18:28 +02:00
|
|
|
statsdialog.cpp \
|
|
|
|
threadhandler.cpp \
|
|
|
|
threadresult.cpp \
|
|
|
|
translationhandler.cpp \
|
2011-04-02 19:16:18 +02:00
|
|
|
txtreport.cpp \
|
|
|
|
xmlreport.cpp \
|
2015-09-04 20:46:26 +02:00
|
|
|
xmlreportv2.cpp \
|
2018-04-09 06:43:48 +02:00
|
|
|
librarydialog.cpp \
|
|
|
|
cppchecklibrarydata.cpp \
|
|
|
|
libraryaddfunctiondialog.cpp \
|
|
|
|
libraryeditargdialog.cpp \
|
2019-06-28 22:36:19 +02:00
|
|
|
newsuppressiondialog.cpp
|
2011-04-02 19:16:18 +02:00
|
|
|
|
|
|
|
win32 {
|
|
|
|
RC_FILE = cppcheck-gui.rc
|
2012-10-14 14:13:54 +02:00
|
|
|
HEADERS += ../lib/version.h
|
2016-01-31 10:10:26 +01:00
|
|
|
contains(LINKCORE, [yY][eE][sS]) {
|
|
|
|
} else {
|
|
|
|
LIBS += -lshlwapi
|
|
|
|
}
|
2011-04-02 19:16:18 +02:00
|
|
|
}
|
2014-01-12 13:51:08 +01:00
|
|
|
|
2014-03-08 14:10:12 +01:00
|
|
|
contains(QMAKE_CC, gcc) {
|
2022-10-17 21:40:35 +02:00
|
|
|
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
|
2014-01-12 13:51:08 +01:00
|
|
|
}
|
2015-01-20 19:20:00 +01:00
|
|
|
|
2016-01-08 15:21:36 +01:00
|
|
|
contains(QMAKE_CXX, clang++) {
|
2022-10-17 21:40:35 +02:00
|
|
|
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
|
2015-01-20 19:20:00 +01:00
|
|
|
}
|
2017-08-09 16:31:04 +02:00
|
|
|
|
|
|
|
contains(HAVE_QCHART, [yY][eE][sS]) {
|
|
|
|
QT += charts
|
|
|
|
} else {
|
|
|
|
message("Charts disabled - to enable it pass HAVE_QCHART=yes to qmake.")
|
|
|
|
}
|
|
|
|
|