2021-11-06 16:30:46 +08:00
|
|
|
|
|
|
|
set(PLUGIN_NAME "airplane-mode")
|
|
|
|
|
|
|
|
project(${PLUGIN_NAME})
|
|
|
|
|
2022-09-16 20:12:52 +00:00
|
|
|
generation_dbus_interface(${CMAKE_CURRENT_SOURCE_DIR}/dbusinterface/xml ${CMAKE_CURRENT_SOURCE_DIR}/dbusinterface/generation_dbus_interface)
|
|
|
|
|
2021-11-06 16:30:46 +08:00
|
|
|
# Sources files
|
2022-09-16 20:12:52 +00:00
|
|
|
file(GLOB_RECURSE SRCS "*.h"
|
|
|
|
"*.cpp"
|
|
|
|
"../../widgets/*.h"
|
|
|
|
"../../widgets/*.cpp"
|
|
|
|
"../../frame/util/imageutil.h"
|
|
|
|
"../../frame/util/imageutil.cpp"
|
|
|
|
"./dbusinterface/generation_dbus_interface/*.h"
|
|
|
|
"./dbusinterface/generation_dbus_interface/*.cpp"
|
|
|
|
"../../frame/qtdbusextended/*.h"
|
|
|
|
"../../frame/qtdbusextended/*.cpp")
|
2021-11-06 16:30:46 +08:00
|
|
|
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
find_package(Qt5Widgets REQUIRED)
|
|
|
|
find_package(Qt5Svg REQUIRED)
|
|
|
|
find_package(Qt5DBus REQUIRED)
|
|
|
|
find_package(DtkWidget REQUIRED)
|
|
|
|
|
2022-03-01 09:49:32 +08:00
|
|
|
pkg_check_modules(XCB_EWMH REQUIRED xcb-ewmh x11 xcursor)
|
2021-11-06 16:30:46 +08:00
|
|
|
pkg_check_modules(QGSettings REQUIRED gsettings-qt)
|
|
|
|
|
|
|
|
add_definitions("${QT_DEFINITIONS} -DQT_PLUGIN")
|
|
|
|
add_library(${PLUGIN_NAME} SHARED ${SRCS} resources/airplane_mode.qrc)
|
|
|
|
set_target_properties(${PLUGIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../system-trays)
|
2022-09-16 20:12:52 +00:00
|
|
|
|
2021-11-06 16:30:46 +08:00
|
|
|
target_include_directories(${PLUGIN_NAME} PUBLIC ${DtkWidget_INCLUDE_DIRS}
|
|
|
|
${QGSettings_INCLUDE_DIRS}
|
|
|
|
../../interfaces
|
|
|
|
../../widgets
|
|
|
|
../../frame
|
|
|
|
../../frame/util
|
2022-09-16 20:12:52 +00:00
|
|
|
../../frame/qtdbusextended
|
|
|
|
./dbusinterface/generation_dbus_interface)
|
|
|
|
|
2021-11-06 16:30:46 +08:00
|
|
|
target_link_libraries(${PLUGIN_NAME} PRIVATE
|
2022-03-01 09:49:32 +08:00
|
|
|
${XCB_EWMH_LIBRARIES}
|
2021-11-06 16:30:46 +08:00
|
|
|
${DtkWidget_LIBRARIES}
|
|
|
|
${QGSettings_LIBRARIES}
|
|
|
|
${Qt5DBus_LIBRARIES}
|
|
|
|
${Qt5Widgets_LIBRARIES}
|
2022-09-16 20:12:52 +00:00
|
|
|
${Qt5Svg_LIBRARIES})
|
2021-11-06 16:30:46 +08:00
|
|
|
|
|
|
|
install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins/system-trays)
|