diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 774f42267..7ceb9c60f 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -9,7 +9,7 @@ if (BUILD_GUI) else() add_definitions(-DQT_DEBUG) endif() - + include_directories(${PROJECT_SOURCE_DIR}/lib/) include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/) @@ -20,7 +20,7 @@ if (BUILD_GUI) QT4_WRAP_UI(uis_hdrs ${uis}) QT4_ADD_RESOURCES(resources "gui.qrc") QT4_ADD_TRANSLATION(qms ${tss}) - + add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $ $ $) target_link_libraries(cppcheck-gui ${QT_LIBRARIES}) if (HAVE_RULES) @@ -31,6 +31,12 @@ if (BUILD_GUI) install(TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications) install(FILES ${qms} DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications) + install(FILES cppcheck-gui.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) + + # icons + install(FILES icon.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps) + install(FILES icon.png DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/64x64/apps) + set(CMAKE_AUTOMOC OFF) endif() diff --git a/gui/cppcheck-gui.desktop b/gui/cppcheck-gui.desktop new file mode 100644 index 000000000..844d5153f --- /dev/null +++ b/gui/cppcheck-gui.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Cppcheck +Comment=A tool for static C/C++ code analysis +Exec=cppcheck-gui +Icon=icon +Categories=Development;Debugger;Qt;