From bdc59a51dc1d4a8f77b13820beebe184072b21fb Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Tue, 27 Sep 2016 13:36:08 +0800 Subject: [PATCH] Add .desktop file --- gui/CMakeLists.txt | 10 ++++++++-- gui/cppcheck-gui.desktop | 8 ++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 gui/cppcheck-gui.desktop 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;