summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-11-08 15:20:30 +0100
committerBalint Reczey <balint@balintreczey.hu>2016-11-18 20:15:23 +0000
commitc27404655650a3648f576663d07394105fd5ef30 (patch)
treed2966a07f77cec2784ce2a5a9156c678be5b404e /CMakeLists.txt
parenta12399018c6c0e0721c54c8982aacc53e8b823eb (diff)
downloadwireshark-c27404655650a3648f576663d07394105fd5ef30.tar.gz
cmake: install icons and .desktop files
Based on the install-data-local target from Makefile.am. Change-Id: Ia2ff6b90475a30ed219019fd80afd1a498e3133c Reviewed-on: https://code.wireshark.org/review/18708 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Balint Reczey <balint@balintreczey.hu> Tested-by: Balint Reczey <balint@balintreczey.hu>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 50288264f7..60b2c12f51 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2702,6 +2702,36 @@ install(
${CMAKE_INSTALL_DATADIR}/${CPACK_PACKAGE_NAME}
)
+# Install icons and other desktop files for Freedesktop.org-compliant desktops.
+if(((BUILD_wireshark AND QT_FOUND) OR BUILD_wireshark_gtk) AND NOT (WIN32 OR APPLE))
+ install(FILES wireshark-mime-package.xml
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/mime/packages"
+ RENAME wireshark.xml
+ )
+ install(FILES wireshark.appdata.xml
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/appdata"
+ )
+ if(BUILD_wireshark AND QT_FOUND)
+ install(FILES wireshark.desktop
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/applications")
+ endif()
+ if(BUILD_wireshark_gtk)
+ install(FILES wireshark-gtk.desktop
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/applications")
+ endif()
+ foreach(size 16 24 32 48 64 128 256)
+ install(FILES image/wsicon${size}.png
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/${size}x${size}/apps"
+ RENAME wireshark.png)
+ install(FILES image/WiresharkDoc-${size}.png
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/${size}x${size}/mimetypes"
+ RENAME application-wireshark-doc.png)
+ endforeach()
+ install(FILES image/wsicon.svg
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps"
+ RENAME wireshark.svg)
+endif()
+
install(
FILES
"${CMAKE_BINARY_DIR}/wireshark.pc"