diff --git a/CMakeLists.txt b/CMakeLists.txt index 581af7b..a01c771 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ project( SnoreNotify ) cmake_minimum_required( VERSION 2.8.12 ) -find_package(ECM 1.2.0 REQUIRED NO_MODULE) +find_package(ECM 1.7.0 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ) diff --git a/data/128-snore.png b/data/128-snore.png new file mode 100644 index 0000000..8de781e Binary files /dev/null and b/data/128-snore.png differ diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 35bff18..e5486e2 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,19 +1 @@ set(SNORE_RCS ${SNORE_RCS} ${CMAKE_CURRENT_SOURCE_DIR}/../data/snore.qrc PARENT_SCOPE) - - -if(WITH_SNORE_DEAMON) - if(WIN32) - set(ICON_NAME zzz) - FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${ICON_NAME}.ico ICON) - string(REPLACE "\\" "\\\\" ICON ${ICON}) - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${ICON_NAME}.rc "IDI_ICON1 ICON DISCARDABLE \"${ICON}\"\n") - set(SNORENOTIFY_DEAMON_DEPS ${SNORENOTIFY_DEPS} ${CMAKE_CURRENT_BINARY_DIR}/${ICON_NAME}.rc PARENT_SCOPE) - endif(WIN32) - - if(KDE4_FOUND) - install(FILES snore.png DESTINATION ${ICON_INSTALL_DIR}/hicolor/48x48/apps) - if(CMAKE_INSTALL_PREFIX STREQUAL "/usr") - install(FILES snore.png DESTINATION /usr/share/pixmaps) - endif(CMAKE_INSTALL_PREFIX STREQUAL "/usr") - endif(KDE4_FOUND) -endif() diff --git a/data/snore.png b/data/snore.png deleted file mode 100644 index 942a304..0000000 Binary files a/data/snore.png and /dev/null differ diff --git a/data/snore.qrc b/data/snore.qrc index f9a1c13..482cdc7 100644 --- a/data/snore.qrc +++ b/data/snore.qrc @@ -1,5 +1,5 @@ - snore.png + 128-snore.png diff --git a/data/zzz.ico b/data/zzz.ico deleted file mode 100644 index 0ee89d6..0000000 Binary files a/data/zzz.ico and /dev/null differ diff --git a/share/CMakeLists.txt b/share/CMakeLists.txt index ebb3b6c..a201fb8 100644 --- a/share/CMakeLists.txt +++ b/share/CMakeLists.txt @@ -1,6 +1,7 @@ if(UNIX AND WITH_SNORE_DEAMON) + install(FILES 128x128-snore.png DESTINATION ${KDE_ICONDIR}/snore.png) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/snorenotify.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/snorenotify.desktop" @ONLY) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/snorenotify.desktop" DESTINATION ${XDG_APPS_INSTALL_DIR}) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/snorenotify.desktop" DESTINATION ${KDE_APPDIR}) endif() if(WIN32) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 348b9fb..dda0ee5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,6 +4,9 @@ add_subdirectory(core) if(WITH_SNORE_DEAMON) + include(ECMAddAppIcon) + ecm_add_app_icon(SNORENOTIFY_DEAMON_DEPS ICONS ${CMAKE_CURRENT_SOURCE_DIR}/../data/128-snore.png) + add_executable( snorenotify WIN32 main.cpp snorenotify.cpp trayicon.cpp ${SNORENOTIFY_DEAMON_DEPS}) target_link_libraries( snorenotify libsnore Qt5::Gui Qt5::Widgets ) install(TARGETS snorenotify RUNTIME DESTINATION bin