Changeset View
Changeset View
Standalone View
Standalone View
src/CMakeLists.txt
Show All 28 Lines | 26 | list(APPEND knotifications_SRCS | |||
---|---|---|---|---|---|
29 | knotificationrestrictions.cpp | 29 | knotificationrestrictions.cpp | ||
30 | 30 | | |||
31 | imageconverter.cpp #needed to marshal images for sending over dbus by NotifyByPopup | 31 | imageconverter.cpp #needed to marshal images for sending over dbus by NotifyByPopup | ||
32 | notifybypopup.cpp | 32 | notifybypopup.cpp | ||
33 | notifybyportal.cpp | 33 | notifybyportal.cpp | ||
34 | ) | 34 | ) | ||
35 | endif() | 35 | endif() | ||
36 | 36 | | |||
37 | if (ANDROID) | ||||
38 | list(APPEND knotifications_SRCS notifybyandroid.cpp) | ||||
39 | # see qtbase/mkspecs/features/java.prf | ||||
40 | set(CMAKE_JAVA_COMPILE_FLAGS -source 6 -target 6) | ||||
41 | if (NOT CMAKE_ANDROID_API VERSION_LESS 23) | ||||
42 | add_jar(knotifications_jar | ||||
43 | SOURCES | ||||
44 | org/kde/knotifications/KNotification.java | ||||
45 | org/kde/knotifications/NotifyByAndroid.java | ||||
46 | INCLUDE_JARS ${ANDROID_SDK_ROOT}/platforms/android-${CMAKE_ANDROID_API}/android.jar | ||||
47 | OUTPUT_NAME KF5Notifications | ||||
48 | ) | ||||
49 | else() | ||||
50 | message(WARNING "Android notification backend needs at least API level 23!") | ||||
51 | endif() | ||||
52 | endif() | ||||
53 | | ||||
37 | ecm_qt_declare_logging_category(knotifications_SRCS HEADER debug_p.h IDENTIFIER LOG_KNOTIFICATIONS CATEGORY_NAME org.kde.knotifications) | 54 | ecm_qt_declare_logging_category(knotifications_SRCS HEADER debug_p.h IDENTIFIER LOG_KNOTIFICATIONS CATEGORY_NAME org.kde.knotifications) | ||
38 | 55 | | |||
39 | if (CANBERRA_FOUND) | 56 | if (CANBERRA_FOUND) | ||
40 | set(knotifications_SRCS ${knotifications_SRCS} | 57 | set(knotifications_SRCS ${knotifications_SRCS} | ||
41 | notifybyaudio_canberra.cpp) | 58 | notifybyaudio_canberra.cpp) | ||
42 | elseif (Phonon4Qt5_FOUND) | 59 | elseif (Phonon4Qt5_FOUND) | ||
43 | set(knotifications_SRCS ${knotifications_SRCS} | 60 | set(knotifications_SRCS ${knotifications_SRCS} | ||
44 | notifybyaudio_phonon.cpp) | 61 | notifybyaudio_phonon.cpp) | ||
▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Line(s) | |||||
118 | if(X11_XTest_FOUND) | 135 | if(X11_XTest_FOUND) | ||
119 | target_link_libraries(KF5Notifications PRIVATE ${X11_XTest_LIB}) | 136 | target_link_libraries(KF5Notifications PRIVATE ${X11_XTest_LIB}) | ||
120 | endif() | 137 | endif() | ||
121 | 138 | | |||
122 | if(HAVE_DBUSMENUQT) | 139 | if(HAVE_DBUSMENUQT) | ||
123 | target_link_libraries(KF5Notifications PRIVATE dbusmenu-qt5) | 140 | target_link_libraries(KF5Notifications PRIVATE dbusmenu-qt5) | ||
124 | endif() | 141 | endif() | ||
125 | 142 | | |||
143 | if (ANDROID) | ||||
144 | target_link_libraries(KF5Notifications PRIVATE Qt5::AndroidExtras) | ||||
145 | endif() | ||||
146 | | ||||
126 | set_target_properties(KF5Notifications PROPERTIES VERSION ${KNOTIFICATIONS_VERSION_STRING} | 147 | set_target_properties(KF5Notifications PROPERTIES VERSION ${KNOTIFICATIONS_VERSION_STRING} | ||
127 | SOVERSION ${KNOTIFICATIONS_SOVERSION} | 148 | SOVERSION ${KNOTIFICATIONS_SOVERSION} | ||
128 | EXPORT_NAME Notifications | 149 | EXPORT_NAME Notifications | ||
129 | ) | 150 | ) | ||
130 | 151 | | |||
131 | ecm_generate_headers(KNotifications_HEADERS | 152 | ecm_generate_headers(KNotifications_HEADERS | ||
132 | HEADER_NAMES | 153 | HEADER_NAMES | ||
133 | KNotification | 154 | KNotification | ||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | |||||
186 | install(FILES | 207 | install(FILES | ||
187 | knotificationplugin.desktop | 208 | knotificationplugin.desktop | ||
188 | DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}) | 209 | DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}) | ||
189 | 210 | | |||
190 | include(ECMGeneratePriFile) | 211 | include(ECMGeneratePriFile) | ||
191 | ecm_generate_pri_file(BASE_NAME KNotifications LIB_NAME KF5Notifications DEPS "widgets" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/KNotifications) | 212 | ecm_generate_pri_file(BASE_NAME KNotifications LIB_NAME KF5Notifications DEPS "widgets" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/KNotifications) | ||
192 | install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR}) | 213 | install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR}) | ||
193 | 214 | | |||
215 | if (ANDROID AND NOT ANDROID_API_LEVEL VERSION_LESS 23) | ||||
216 | install_jar(knotifications_jar DESTINATION jar) | ||||
217 | install(FILES KF5Notifications-android-dependencies.xml DESTINATION ${KDE_INSTALL_LIBDIR}) | ||||
218 | endif() |