diff --git a/share/CMakeLists.txt b/share/CMakeLists.txt index 7e8c909..2f8a041 100644 --- a/share/CMakeLists.txt +++ b/share/CMakeLists.txt @@ -1,9 +1,11 @@ -install(FILES FindLibsnore.cmake DESTINATION share/apps/cmake/modules) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/FindLibsnore.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/FindLibsnore${SNORE_SUFFIX}.cmake" @ONLY) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/FindLibsnore${SNORE_SUFFIX}.cmake" DESTINATION share/apps/cmake/modules) -if(KDE4_FOUND) - install(FILES snorenotify.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) -endif(KDE4_FOUND) +if(KDE4_FOUND AND WITH_SNORE_DEAMON) + 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}) +endif(KDE4_FOUND AND WITH_SNORE_DEAMON) if(WIN32) add_subdirectory(snoretoast) -endif(WIN32) \ No newline at end of file +endif(WIN32) diff --git a/share/FindLibsnore.cmake b/share/FindLibsnore.cmake.in similarity index 94% rename from share/FindLibsnore.cmake rename to share/FindLibsnore.cmake.in index 1af3944..aff4b1c 100644 --- a/share/FindLibsnore.cmake +++ b/share/FindLibsnore.cmake.in @@ -13,8 +13,8 @@ find_path(LIBSNORE_INCLUDE_DIR find_library(LIBSNORE_LIBRARY NAMES - libsnore - snore + libsnore@SNORE_SUFFIX@ + snore@SNORE_SUFFIX@ PATHS ${KDE4_LIB_DIR} ) diff --git a/share/snorenotify.desktop b/share/snorenotify.desktop deleted file mode 100644 index ae3f909..0000000 --- a/share/snorenotify.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Type=Application -Version=0.15 -Name=SnoreNotify -Comment=An application which redirects dbus notifications to a unifided notification backend -Icon=snore -Exec=snorenotify -Categories=Qt;System; -X-KDE-StartupNotify=true -X-DBUS-StartupType=Unique diff --git a/share/snorenotify.desktop.in b/share/snorenotify.desktop.in new file mode 100644 index 0000000..445cfbb --- /dev/null +++ b/share/snorenotify.desktop.in @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Version=@SNORE_VERSION_MAJOR@.@SNORE_VERSION_MINOR@@SNORE_VERSION_SUFFIX@ +Name=SnoreNotify +Comment=An application redirecting freedesktop notifications to a unified notification backed +Icon=snore +Exec=snorenotify@SNORE_SUFFIX@ +Categories=Qt;System; +X-KDE-StartupNotify=true +X-DBUS-StartupType=Unique