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
|
add_definitions(-DTRANSLATION_DOMAIN=\"kdevcppcheck\")
find_package(Cppcheck QUIET)
set_package_properties(Cppcheck PROPERTIES
DESCRIPTION "A tool for static C/C++ code analysis"
URL "http://cppcheck.sourceforge.net/"
PURPOSE "Recommended: required by the non-essential Cppcheck plugin"
TYPE RUNTIME
)
set(kdevcppcheck_core_SRCS
parser.cpp
job.cpp
parameters.cpp
utils.cpp
)
ecm_qt_declare_logging_category(kdevcppcheck_core_SRCS
HEADER debug.h
IDENTIFIER KDEV_CPPCHECK
CATEGORY_NAME "kdevelop.plugins.cppcheck"
)
kconfig_add_kcfg_files(kdevcppcheck_core_SRCS
config/globalsettings.kcfgc
config/projectsettings.kcfgc
)
add_library(kdevcppcheck_core STATIC
${kdevcppcheck_core_SRCS}
)
target_link_libraries(kdevcppcheck_core
KDev::Language
KDev::Project
KDev::Shell
)
set(kdevcppcheck_SRCS
plugin.cpp
problemmodel.cpp
config/globalconfigpage.cpp
config/projectconfigpage.cpp
)
ki18n_wrap_ui(kdevcppcheck_SRCS
config/globalconfigpage.ui
config/projectconfigpage.ui
)
qt5_add_resources(kdevcppcheck_SRCS
kdevcppcheck.qrc
)
kdevplatform_add_plugin(kdevcppcheck
JSON kdevcppcheck.json
SOURCES ${kdevcppcheck_SRCS}
)
target_link_libraries(kdevcppcheck
kdevcppcheck_core
KF5::ItemViews
)
ecm_install_icons(ICONS icons/128-apps-cppcheck.png
DESTINATION ${KDE_INSTALL_ICONDIR} THEME hicolor)
if(BUILD_TESTING)
add_subdirectory(tests)
endif()
|