ukui-notification/notification-ukcc-plugin/CMakeLists.txt

39 lines
1.2 KiB
CMake
Raw Normal View History

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})
include_directories(../libukui-notification)
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
)
install(TARGETS notification-ukcc-plugin DESTINATION /usr/lib/x86_64-linux-gnu/ukui-control-center)