mirror of
https://github.com/status-im/snorenotify.git
synced 2025-01-09 16:15:45 +00:00
make buildin backend optional
This commit is contained in:
parent
08b8f662dd
commit
862a9d0362
@ -35,7 +35,6 @@ set(SNORE_CamelCase_SUFFIX "Qt5")
|
||||
|
||||
find_package(Qt5Core REQUIRED)
|
||||
find_package(Qt5Network REQUIRED)
|
||||
find_package(Qt5Quick REQUIRED)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
|
||||
|
||||
|
@ -1,15 +1,22 @@
|
||||
QT5_ADD_RESOURCES(SNORENOTIFIER_RCS ${CMAKE_CURRENT_SOURCE_DIR}/snore_notification.qrc)
|
||||
find_package(Qt5Quick QUIET)
|
||||
set_package_properties(Qt5Quick PROPERTIES
|
||||
PURPOSE "Adding buildin notifiaction backend."
|
||||
TYPE OPTIONAL)
|
||||
|
||||
set( SNORE_SRC
|
||||
snorenotifier.cpp
|
||||
snorenotifiersettings.cpp
|
||||
notifywidget.cpp
|
||||
${SNORENOTIFIER_RCS}
|
||||
)
|
||||
|
||||
if(Qt5Quick_FOUND)
|
||||
QT5_ADD_RESOURCES(SNORENOTIFIER_RCS ${CMAKE_CURRENT_SOURCE_DIR}/snore_notification.qrc)
|
||||
|
||||
set( SNORE_SRC
|
||||
snorenotifier.cpp
|
||||
snorenotifiersettings.cpp
|
||||
notifywidget.cpp
|
||||
${SNORENOTIFIER_RCS}
|
||||
)
|
||||
|
||||
|
||||
add_library(libsnore_backend_snore MODULE ${SNORE_SRC} )
|
||||
target_link_libraries(libsnore_backend_snore Snore::Libsnore Qt5::Quick)
|
||||
|
||||
install(TARGETS libsnore_backend_snore ${SNORE_PLUGIN_INSTALL_PATH})
|
||||
add_library(libsnore_backend_snore MODULE ${SNORE_SRC} )
|
||||
target_link_libraries(libsnore_backend_snore Snore::Libsnore Qt5::Quick)
|
||||
|
||||
install(TARGETS libsnore_backend_snore ${SNORE_PLUGIN_INSTALL_PATH})
|
||||
endif()
|
Loading…
x
Reference in New Issue
Block a user