Changeset View
Standalone View
CMakeLists.txt
Show All 29 Lines | 29 | PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5NotificationsConfigVersion.cmake" | |||
---|---|---|---|---|---|
30 | 30 | | |||
31 | SOVERSION 5) | 31 | SOVERSION 5) | ||
32 | 32 | | |||
33 | # Dependencies | 33 | # Dependencies | ||
34 | set(REQUIRED_QT_VERSION 5.11.0) | 34 | set(REQUIRED_QT_VERSION 5.11.0) | ||
35 | set(CMAKE_AUTORCC TRUE) | 35 | set(CMAKE_AUTORCC TRUE) | ||
36 | 36 | | |||
37 | find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets) | 37 | find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets) | ||
38 | if (NOT ANDROID) | 38 | if (ANDROID) | ||
nicolasfella: This seems to be entirely urelated to audio? | |||||
I was trying to simplify code there by removing NOT. Should I remove this change? brute4s99: I was trying to simplify code there by removing `NOT`. Should I remove this change? | |||||
Yes. It is neither related to Windows nor audio. What you can to is to add Windows to the condition to not look for DBus on Windows, but please do that in a separate patch. Or move the find call for DBus down to the auto checks inside the if nicolasfella: Yes. It is neither related to Windows nor audio. What you can to is to add Windows to the… | |||||
I'm looking into the DBus problem, we currently use DBus for the system tray icon on Windows. Once that is resolved, I should be able to completely remove DBus from the Windows build brute4s99: I'm looking into the DBus problem, we currently use DBus for the system tray icon on Windows. | |||||
Update: nope. I think it's still use for the dbus interfaces. I confirmed by ending the dbus-daemon.exe process by hand to see it. Turns out, dbus is quite important for KDE Connect regardless of the OS. (: brute4s99: Update: nope. I think it's still use for the dbus interfaces. I confirmed by ending the `dbus… | |||||
But this is KNotifications, not KDE Connect. So we need DBus for KNotifications on Windows? nicolasfella: But this is KNotifications, not KDE Connect. So we need DBus for KNotifications on Windows? | |||||
brute4s99: ah, yeah we could bypass DBus on Windows in KNotifications | |||||
39 | find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED DBus) | | |||
40 | else () | | |||
41 | find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED AndroidExtras) | 39 | find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED AndroidExtras) | ||
42 | find_package(Gradle REQUIRED) | 40 | find_package(Gradle REQUIRED) | ||
41 | else () | ||||
42 | find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED DBus) | ||||
nicolasfella: We don't need DBus on Windows, do we? | |||||
we don't, I guess, but dbus-daemon.exe still runs in the background so I can't say. brute4s99: we don't, I guess, but dbus-daemon.exe still runs in the background so I can't say.
The… | |||||
nicolasfella: Move it down to the audio logic, the if check is the same | |||||
43 | endif() | 43 | endif() | ||
44 | find_package(Qt5 ${REQUIRED_QT_VERSION} QUIET OPTIONAL_COMPONENTS TextToSpeech) | 44 | find_package(Qt5 ${REQUIRED_QT_VERSION} QUIET OPTIONAL_COMPONENTS TextToSpeech) | ||
45 | set_package_properties(Qt5TextToSpeech PROPERTIES | 45 | set_package_properties(Qt5TextToSpeech PROPERTIES | ||
46 | DESCRIPTION "Qt text to speech module" | 46 | DESCRIPTION "Qt text to speech module" | ||
47 | TYPE OPTIONAL | 47 | TYPE OPTIONAL | ||
48 | PURPOSE "Required to build text to speech notification support") | 48 | PURPOSE "Required to build text to speech notification support") | ||
49 | if (Qt5TextToSpeech_FOUND) | 49 | if (Qt5TextToSpeech_FOUND) | ||
50 | add_definitions(-DHAVE_SPEECH) | 50 | add_definitions(-DHAVE_SPEECH) | ||
Show All 16 Lines | 66 | if(APPLE) | |||
67 | find_package(Qt5MacExtras ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) | 67 | find_package(Qt5MacExtras ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) | ||
68 | endif() | 68 | endif() | ||
69 | 69 | | |||
70 | find_package(KF5WindowSystem ${KF5_DEP_VERSION} REQUIRED) | 70 | find_package(KF5WindowSystem ${KF5_DEP_VERSION} REQUIRED) | ||
71 | find_package(KF5Config ${KF5_DEP_VERSION} REQUIRED) | 71 | find_package(KF5Config ${KF5_DEP_VERSION} REQUIRED) | ||
72 | find_package(KF5Codecs ${KF5_DEP_VERSION} REQUIRED) | 72 | find_package(KF5Codecs ${KF5_DEP_VERSION} REQUIRED) | ||
73 | find_package(KF5CoreAddons ${KF5_DEP_VERSION} REQUIRED) | 73 | find_package(KF5CoreAddons ${KF5_DEP_VERSION} REQUIRED) | ||
74 | 74 | | |||
75 | if(NOT ANDROID AND NOT WIN32) | ||||
75 | find_package(Canberra) | 76 | find_package(Canberra) | ||
76 | set_package_properties(Canberra PROPERTIES DESCRIPTION "Library for generating event sounds" | 77 | set_package_properties(Canberra PROPERTIES DESCRIPTION "Library for generating event sounds" | ||
77 | PURPOSE "Needed to build audio notification support" | 78 | PURPOSE "Needed to build audio notification support" | ||
78 | URL "http://0pointer.de/lennart/projects/libcanberra" | 79 | URL "http://0pointer.de/lennart/projects/libcanberra" | ||
79 | TYPE OPTIONAL) | 80 | TYPE OPTIONAL) | ||
80 | if (Canberra_FOUND) | 81 | if(Canberra_FOUND) | ||
81 | add_definitions(-DHAVE_CANBERRA) | 82 | add_definitions(-DHAVE_CANBERRA) | ||
82 | elseif(NOT ANDROID) | 83 | else() | ||
83 | # This is REQUIRED since you cannot tell CMake "either one of those two optional ones are required" | 84 | # This is REQUIRED since you cannot tell CMake "either one of those two optional ones are required" | ||
84 | find_package(Phonon4Qt5 4.6.60 NO_MODULE REQUIRED) | 85 | find_package(Phonon4Qt5 4.6.60 NO_MODULE REQUIRED) | ||
85 | set_package_properties(Phonon4Qt5 PROPERTIES | 86 | set_package_properties(Phonon4Qt5 PROPERTIES | ||
86 | DESCRIPTION "Qt-based audio library" | 87 | DESCRIPTION "Qt-based audio library" | ||
87 | PURPOSE "Needed to build audio notification support when Canberra isn't available") | 88 | PURPOSE "Needed to build audio notification support when Canberra isn't available") | ||
88 | add_definitions(-DHAVE_PHONON4QT5) | 89 | add_definitions(-DHAVE_PHONON4QT5) | ||
89 | endif() | 90 | endif() | ||
90 | 91 | endif() | |||
91 | remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY) | 92 | remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY) | ||
apol: indentation is wrong. | |||||
92 | #add_definitions(-DQT_NO_FOREACH) | 93 | #add_definitions(-DQT_NO_FOREACH) | ||
93 | if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") | 94 | if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") | ||
94 | ecm_install_po_files_as_qm(po) | 95 | ecm_install_po_files_as_qm(po) | ||
95 | endif() | 96 | endif() | ||
96 | if (NOT APPLE) # QtMac::setBadgeLabelText is deprecated | 97 | if (NOT APPLE) # QtMac::setBadgeLabelText is deprecated | ||
97 | add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00) | 98 | add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00) | ||
98 | endif() | 99 | endif() | ||
99 | add_subdirectory(src) | 100 | add_subdirectory(src) | ||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |
This seems to be entirely urelated to audio?