Add .desktop file

This commit is contained in:
Chocobo1 2016-09-27 13:36:08 +08:00
parent a3a392a8c4
commit bdc59a51dc
2 changed files with 16 additions and 2 deletions

View File

@ -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_OBJECTS:lib_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
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()

8
gui/cppcheck-gui.desktop Normal file
View File

@ -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;