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)
|
|
|
|
|
|
|
|
add_library(notification-ukcc-plugin SHARED ${notification-ukcc-plugin_LIB_SRCS})
|
|
|
|
|
|
|
|
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Widgets REQUIRED)
|
|
|
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets REQUIRED)
|
|
|
|
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
|
|
|
|
|
|
|
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-17 15:01:29 +08:00
|
|
|
install(TARGETS notification-ukcc-plugin DESTINATION /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/ukui-control-center)
|
2023-03-15 14:42:54 +08:00
|
|
|
|