2023-03-15 14:42:54 +08:00
|
|
|
|
|
|
|
set(notification-ukcc-plugin_LIB_SRCS
|
|
|
|
notification-ukcc-plugin.cpp
|
|
|
|
notification-ukcc-plugin.h
|
|
|
|
noticemenu.cpp
|
|
|
|
noticemenu.h)
|
|
|
|
|
2023-03-28 15:20:03 +08:00
|
|
|
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Widgets LinguistTools REQUIRED)
|
|
|
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Widgets LinguistTools REQUIRED)
|
2023-03-15 14:42:54 +08:00
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
set(UKUI_NOTIFICATION_EXTERNAL_LIBS "")
|
|
|
|
set(UKUI_NOTIFICATION_PC_PKGS kysdk-qtwidgets)
|
|
|
|
|
|
|
|
foreach(PC_LIB IN ITEMS ${UKUI_NOTIFICATION_PC_PKGS})
|
|
|
|
pkg_check_modules(${PC_LIB} REQUIRED ${PC_LIB})
|
|
|
|
if(${${PC_LIB}_FOUND})
|
|
|
|
include_directories(${${PC_LIB}_INCLUDE_DIRS})
|
|
|
|
link_directories(${${PC_LIB}_LIBRARY_DIRS})
|
|
|
|
list(APPEND UKUI_NOTIFICATION_EXTERNAL_LIBS ${${PC_LIB}_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
|
2023-03-17 15:01:29 +08:00
|
|
|
include_directories(../libukui-notification/notification-settings)
|
2023-03-17 16:08:24 +08:00
|
|
|
include_directories(../libukui-notification)
|
2023-03-15 14:42:54 +08:00
|
|
|
|
2023-03-28 15:20:03 +08:00
|
|
|
|
|
|
|
file(GLOB TS_FILES "${PROJECT_SOURCE_DIR}/notification-ukcc-plugin/translations/*.ts")
|
|
|
|
qt5_add_translation(QM_FILES ${TS_FILES})
|
|
|
|
#set(QM_FILES ${QM_FILES} PARENT_SCOPE)
|
|
|
|
add_custom_target(translations ALL DEPENDS ${QM_FILES})
|
|
|
|
|
|
|
|
add_library(notification-ukcc-plugin SHARED
|
|
|
|
${notification-ukcc-plugin_LIB_SRCS}
|
|
|
|
${QM_FILES}
|
|
|
|
)
|
|
|
|
|
2023-03-15 14:42:54 +08:00
|
|
|
target_link_libraries(notification-ukcc-plugin
|
|
|
|
PRIVATE
|
|
|
|
Qt${QT_VERSION_MAJOR}::Core
|
|
|
|
Qt${QT_VERSION_MAJOR}::DBus
|
|
|
|
Qt${QT_VERSION_MAJOR}::Network
|
|
|
|
ukui-notification
|
|
|
|
ukcc
|
|
|
|
)
|
2023-03-28 15:20:03 +08:00
|
|
|
|
2023-03-17 15:01:29 +08:00
|
|
|
install(TARGETS notification-ukcc-plugin DESTINATION /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/ukui-control-center)
|
2023-03-28 15:20:03 +08:00
|
|
|
install(FILES ${TS_FILES} ${QM_FILES} DESTINATION /usr/share/ukui-notification/notification-ukcc-plugin/translations)
|
2023-03-15 14:42:54 +08:00
|
|
|
|