diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2024-02-10 11:06:55 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2024-02-10 11:06:55 +0100 |
commit | 3c96448bcfbada82b4a8739dd216205920ee3ede (patch) | |
tree | 8117dbe98cd62680bc5e785acff3a6626a6f08c4 /CMakeLists.txt | |
parent | 92902a4f76747a11e70d38f3c1ffe5c408b4cb6a (diff) | |
download | hex-3c96448bcfbada82b4a8739dd216205920ee3ede.tar.gz hex-3c96448bcfbada82b4a8739dd216205920ee3ede.tar.xz hex-3c96448bcfbada82b4a8739dd216205920ee3ede.zip |
Bump liberty, add an icon
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 52a5c5d..26ea1a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,7 +63,7 @@ if (WITH_LUA) endif () endif () -pkg_check_modules (x11 x11 xrender xft fontconfig) +pkg_check_modules (x11 x11 xrender xft fontconfig libpng) option (WITH_X11 "Build with X11 support" ${x11_FOUND}) if (WITH_X11) if (NOT x11_FOUND) @@ -110,6 +110,22 @@ if (WITH_LUA) DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}) endif () if (WITH_X11) + include (IconUtils) + + set (icon_base ${PROJECT_BINARY_DIR}/icons) + set (icon_png_list) + foreach (icon_size 16 32 48) + icon_to_png (${PROJECT_NAME} ${PROJECT_SOURCE_DIR}/${PROJECT_NAME}.svg + ${icon_size} ${icon_base} icon_png) + list (APPEND icon_png_list ${icon_png}) + endforeach () + + add_custom_target (icons ALL DEPENDS ${icon_png_list}) + + install (FILES ${PROJECT_NAME}.svg + DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps) + install (DIRECTORY ${icon_base} + DESTINATION ${CMAKE_INSTALL_DATADIR}) install (FILES ${PROJECT_NAME}.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) endif () |