mirror of
https://github.com/status-im/snorenotify.git
synced 2025-02-13 00:46:26 +00:00
Make dependencie to QWidget optional
This commit is contained in:
parent
6768fe024d
commit
e7dec50230
@ -38,7 +38,12 @@ set(SNORE_CamelCase_SUFFIX "Qt5")
|
||||
|
||||
find_package(Qt5Core REQUIRED)
|
||||
find_package(Qt5Network REQUIRED)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
find_package(Qt5Gui REQUIRED)
|
||||
find_package(Qt5Widgets QUIET)
|
||||
|
||||
set_package_properties(Qt5Widgets PROPERTIES
|
||||
PURPOSE "Supprot for the daemon and the settings dialog as well as some backends."
|
||||
TYPE OPTIONAL)
|
||||
|
||||
|
||||
set(LIBSNORE_INCLUDE_DIR ${KDE_INSTALL_INCLUDEDIR}/libsnore)
|
||||
|
@ -2,11 +2,13 @@ include(libsnore/SnoreAddPlugin.cmake)
|
||||
|
||||
add_subdirectory(libsnore)
|
||||
|
||||
ecm_optional_add_subdirectory(daemon)
|
||||
add_feature_info(BUILD_daemon BUILD_daemon "Build and installd the snorenotify daemon which recieves and redirects notifications.")
|
||||
if(Qt5Widgets_FOUND)
|
||||
ecm_optional_add_subdirectory(daemon)
|
||||
add_feature_info(BUILD_daemon BUILD_daemon "Build and installd the snorenotify daemon which recieves and redirects notifications.")
|
||||
|
||||
ecm_optional_add_subdirectory(settings)
|
||||
add_feature_info(BUILD_settings BUILD_settings "Build and installd the snorensettings application which allows the modification of the settings for all applications using libsnore.")
|
||||
ecm_optional_add_subdirectory(settings)
|
||||
add_feature_info(BUILD_settings BUILD_settings "Build and installd the snorensettings application which allows the modification of the settings for all applications using libsnore.")
|
||||
endif()
|
||||
|
||||
ecm_optional_add_subdirectory(snoresend)
|
||||
add_feature_info(BUILD_snoresend BUILD_snoresend "Build and installd the snoresend application, a commandline interface for sendig notifications.")
|
||||
|
@ -104,5 +104,6 @@ if(UNIX)
|
||||
ecm_install_icons(ICONS ${PROJECT_SOURCE_DIR}/data/128-apps-snore.png DESTINATION ${KDE_INSTALL_ICONDIR})
|
||||
endif()
|
||||
|
||||
|
||||
add_subdirectory(settings)
|
||||
if(Qt5Widgets_FOUND)
|
||||
add_subdirectory(settings)
|
||||
endif()
|
@ -2,6 +2,7 @@
|
||||
|
||||
find_dependency(Qt5Core REQUIRED)
|
||||
find_dependency(Qt5Network REQUIRED)
|
||||
find_dependency(Qt5Gui REQUIRED)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/Libsnore@SNORE_CamelCase_SUFFIX@Target.cmake")
|
||||
|
||||
|
@ -11,7 +11,7 @@ function(add_snore_plugin name)
|
||||
target_link_libraries(libsnore_${ARG_TYPE}_${name} Snore::Libsnore ${ARG_LIBS})
|
||||
install(TARGETS libsnore_${ARG_TYPE}_${name} ${SNORE_PLUGIN_INSTALL_PATH})
|
||||
|
||||
if(ARG_SETTINGS_SOURCES)
|
||||
if(ARG_SETTINGS_SOURCES AND Qt5Widgets_FOUND)
|
||||
add_library(libsnore_settings_${ARG_TYPE}_${name} MODULE ${ARG_SETTINGS_SOURCES} )
|
||||
target_link_libraries(libsnore_settings_${ARG_TYPE}_${name} Snore::Libsnore Snore::LibsnoreSettings ${ARG_SETTINGS_LIBS})
|
||||
install(TARGETS libsnore_settings_${ARG_TYPE}_${name} ${SNORE_PLUGIN_INSTALL_PATH})
|
||||
|
@ -1 +1,3 @@
|
||||
add_snore_plugin(trayicon SOURCES trayiconnotifer.cpp TYPE backend LIBS Qt5::Widgets)
|
||||
if(Qt5Widgets_FOUND)
|
||||
add_snore_plugin(trayicon SOURCES trayiconnotifer.cpp TYPE backend LIBS Qt5::Widgets)
|
||||
endif()
|
Loading…
x
Reference in New Issue
Block a user