Changeset View
Standalone View
src/CMakeLists.txt
Show All 33 Lines | 25 | if (TARGET Qt5::DBus) | |||
---|---|---|---|---|---|
34 | ) | 34 | ) | ||
35 | endif() | 35 | endif() | ||
36 | 36 | | |||
37 | if (ANDROID) | 37 | if (ANDROID) | ||
38 | add_subdirectory(android) | 38 | add_subdirectory(android) | ||
39 | list(APPEND knotifications_SRCS notifybyandroid.cpp knotifications.qrc) | 39 | list(APPEND knotifications_SRCS notifybyandroid.cpp knotifications.qrc) | ||
40 | endif() | 40 | endif() | ||
41 | 41 | | |||
42 | if (WIN32) | ||||
43 | find_package(LibSnoreToast REQUIRED) | ||||
sredman: Do you know whether this requires MSVC, or can SnoreToast.exe be built with MSVC and… | |||||
AFAIU it *should work fine with any compiler*, once SnoreToast is installed within the system one way or the other. (: brute4s99: AFAIU it *should work fine with any compiler*, once SnoreToast is installed within the system… | |||||
44 | set_package_properties(LibSnoreToast PROPERTIES TYPE REQUIRED | ||||
pino: the find_package above is REQUIRED, while here it is marked as OPTIONAL | |||||
45 | PURPOSE "Enable support for the Windows Toast Notifications with SnoreToast back-end for KNotifications" | ||||
vonreth: It's snoretoast not Snorenotify 😊 so you used the wrong description | |||||
46 | DESCRIPTION "A command line application which is capable of creating Windows Toast notifications on Windows 8 or later." | ||||
47 | ) | ||||
48 | find_package(Qt5Core REQUIRED) | ||||
nicolasfella: find_package calls are usually in the toplevel CMakeLists.txt | |||||
49 | find_package(Qt5Network REQUIRED) | ||||
why are these two needed? if snoretoast require them, then its cmake config file must require them, so that the above find_package(LibSnoreToast) is enough pino: why are these two needed? if snoretoast require them, then its cmake config file must require… | |||||
the interfacing plugin (notifybysnore) requires QLocalServer and QLocalSocket, which are from Qt5Network. brute4s99: the interfacing plugin (notifybysnore) requires QLocalServer and QLocalSocket, which are from… | |||||
Qt5Core is already pretty much required to build anything using Qt5, so looking for it in this place is a no-op (because it was already found) pino: Qt5Core is already pretty much required to build anything using Qt5, so looking for it in this… | |||||
pino: still there | |||||
pino: what do you need XmlPatterns for? | |||||
50 | list(APPEND knotifications_SRCS notifybysnore.cpp) | ||||
51 | endif () | ||||
pino: this is indented too much | |||||
52 | | ||||
42 | ecm_qt_declare_logging_category(knotifications_SRCS HEADER debug_p.h IDENTIFIER LOG_KNOTIFICATIONS CATEGORY_NAME org.kde.knotifications) | 53 | ecm_qt_declare_logging_category(knotifications_SRCS HEADER debug_p.h IDENTIFIER LOG_KNOTIFICATIONS CATEGORY_NAME org.kde.knotifications) | ||
43 | 54 | | |||
44 | if (Canberra_FOUND) | 55 | if (Canberra_FOUND) | ||
45 | set(knotifications_SRCS ${knotifications_SRCS} | 56 | set(knotifications_SRCS ${knotifications_SRCS} | ||
46 | notifybyaudio_canberra.cpp) | 57 | notifybyaudio_canberra.cpp) | ||
47 | elseif (Phonon4Qt5_FOUND) | 58 | elseif (Phonon4Qt5_FOUND) | ||
48 | set(knotifications_SRCS ${knotifications_SRCS} | 59 | set(knotifications_SRCS ${knotifications_SRCS} | ||
49 | notifybyaudio_phonon.cpp) | 60 | notifybyaudio_phonon.cpp) | ||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | 102 | if (TARGET Qt5::DBus) | |||
92 | target_link_libraries(KF5Notifications PUBLIC Qt5::DBus) | 103 | target_link_libraries(KF5Notifications PUBLIC Qt5::DBus) | ||
93 | endif() | 104 | endif() | ||
94 | target_link_libraries(KF5Notifications PRIVATE | 105 | target_link_libraries(KF5Notifications PRIVATE | ||
95 | KF5::CoreAddons | 106 | KF5::CoreAddons | ||
96 | KF5::ConfigCore | 107 | KF5::ConfigCore | ||
97 | KF5::WindowSystem | 108 | KF5::WindowSystem | ||
98 | KF5::Codecs | 109 | KF5::Codecs | ||
99 | ) | 110 | ) | ||
111 | if (TARGET SnoreToast::SnoreToastActions) | ||||
pino: this should be the `_FOUND` variable, just like done for the others | |||||
Hm I don't think the config sets a found variable. But if (TARGET Snoretoast::Snoretoast) Actions should work. vonreth: Hm I don't think the config sets a found variable. But
if (TARGET Snoretoast::Snoretoast)… | |||||
112 | target_link_libraries(KF5Notifications PRIVATE Qt5::Core Qt5::Network SnoreToast::SnoreToastActions) | ||||
Qt5::Core is not needed here; if we really want to be pedantic, it ought to be added unconditionally (however that would be a different patch than this one) pino: `Qt5::Core` is not needed here; if we really want to be pedantic, it ought to be added… | |||||
pino: still there | |||||
113 | endif () | ||||
100 | 114 | | |||
101 | if (Phonon4Qt5_FOUND) | 115 | if (Phonon4Qt5_FOUND) | ||
102 | target_link_libraries(KF5Notifications PRIVATE | 116 | target_link_libraries(KF5Notifications PRIVATE | ||
103 | ${PHONON_LIBRARIES}) | 117 | ${PHONON_LIBRARIES}) | ||
104 | endif() | 118 | endif() | ||
105 | 119 | | |||
106 | if (Canberra_FOUND) | 120 | if (Canberra_FOUND) | ||
107 | target_link_libraries(KF5Notifications PRIVATE | 121 | target_link_libraries(KF5Notifications PRIVATE | ||
▲ Show 20 Lines • Show All 98 Lines • Show Last 20 Lines |
Do you know whether this requires MSVC, or can SnoreToast.exe be built with MSVC and KNotifications be built with an unspecified compiler?