fix: make KF6 NotifyConfig build on Redox
This commit is contained in:
@@ -28,7 +28,7 @@ include(ECMDeprecationSettings)
|
||||
|
||||
# Required Qt components to build this framework
|
||||
set(REQUIRED_QT_VERSION 6.6.0)
|
||||
find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Widgets)
|
||||
find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Widgets Network)
|
||||
|
||||
# shall we use DBus?
|
||||
# enabled per default on Linux & BSD systems
|
||||
@@ -48,16 +48,15 @@ find_package(KF6Config ${KF_DEP_VERSION} REQUIRED)
|
||||
find_package(KF6I18n ${KF_DEP_VERSION} REQUIRED)
|
||||
find_package(KF6KIO ${KF_DEP_VERSION} REQUIRED)
|
||||
|
||||
find_package(Canberra)
|
||||
# find_package(Canberra disabled on Redox)
|
||||
set_package_properties(Canberra PROPERTIES
|
||||
PURPOSE "Needed to preview notification sounds"
|
||||
TYPE OPTIONAL)
|
||||
if (NOT Canberra_FOUND)
|
||||
# This is REQUIRED since you cannot tell CMake "either one of those two optional ones are required"
|
||||
find_package(Qt6Multimedia REQUIRED)
|
||||
set_package_properties(Qt6Multimedia PROPERTIES
|
||||
DESCRIPTION "Qt multimedia library"
|
||||
PURPOSE "Needed to preview notification sounds when Canberra isn't available")
|
||||
# Redox does not package Qt6Multimedia yet. KNotifyConfig guards the sound
|
||||
# preview implementation with HAVE_QTMULTIMEDIA, so keep notification
|
||||
# configuration available and disable only preview playback on this target.
|
||||
set(Qt6Multimedia_FOUND FALSE)
|
||||
endif()
|
||||
|
||||
# ECM setup
|
||||
@@ -79,7 +78,7 @@ ecm_set_disabled_deprecation_versions(
|
||||
|
||||
# Subdirectories
|
||||
add_definitions(-DTRANSLATION_DOMAIN=\"knotifyconfig6\")
|
||||
ki18n_install(po)
|
||||
#ki18n_install(po)
|
||||
add_subdirectory(src)
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(tests)
|
||||
|
||||
Reference in New Issue
Block a user