ukui-notification/libukui-notification/CMakeLists.txt

34 lines
1.7 KiB
CMake

set(ukui-notification_LIB_SRCS
notification-client.cpp
notification-client.h
popup-notification.h
popup-notification.cpp
ukui-notification_global.h
notification-client-private.h
)
if(COMMAND qt_add_dbus_interface)
qt_add_dbus_interface(ukui-notification_LIB_SRCS ../dbus/org.freedesktop.Notifications.xml notifications_interface)
qt_add_dbus_adaptor(ukui-notification_LIB_SRCS ../dbus/org.ukui.NotificationClient.xml notification-client-private.h UkuiNotification::NotificationClientPrivate)
else()
qt5_add_dbus_interface(ukui-notification_LIB_SRCS ../dbus/org.freedesktop.Notifications.xml notifications_interface)
qt5_add_dbus_adaptor(ukui-notification_LIB_SRCS ../dbus/org.ukui.NotificationClient.xml notification-client-private.h UkuiNotification::NotificationClientPrivate)
endif()
add_library(ukui-notification SHARED ${ukui-notification_LIB_SRCS})
target_link_libraries(ukui-notification
PRIVATE
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::DBus
Qt${QT_VERSION_MAJOR}::Gui
)
target_compile_definitions(ukui-notification PRIVATE UKUINOTIFICATION_LIBRARY)
include(CMakePackageConfigHelpers)
set(CMAKECONFIG_INSTALL_DIR "/usr/lib/ukui-notification")
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/ukui-notification-config.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/ukui-notification-config.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR})
set(PC_INSTALL_DIR "/usr/lib/pkgconfig")
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/ukui-notification.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/ukui-notification.pc.in"
INSTALL_DESTINATION ${PC_INSTALL_DIR})