2018-03-05 21:25:21 +08:00
|
|
|
|
2018-11-13 20:07:52 +08:00
|
|
|
set(PLUGIN_NAME "tray")
|
2018-03-05 21:25:21 +08:00
|
|
|
|
|
|
|
project(${PLUGIN_NAME})
|
|
|
|
|
|
|
|
# Sources files
|
2018-08-16 10:05:16 +08:00
|
|
|
file(GLOB_RECURSE SRCS "*.h" "*.cpp" "../../widgets/*.h" "../../widgets/*.cpp"
|
2018-10-24 18:09:44 +08:00
|
|
|
"../../frame/util/themeappicon.h" "../../frame/util/themeappicon.cpp"
|
|
|
|
"../../frame/util/dockpopupwindow.h" "../../frame/util/dockpopupwindow.cpp"
|
2019-01-07 20:33:15 +08:00
|
|
|
"../../frame/util/abstractpluginscontroller.h" "../../frame/util/abstractpluginscontroller.cpp"
|
|
|
|
"../../frame/util/pluginloader.h" "../../frame/util/pluginloader.cpp"
|
2019-01-15 19:54:13 +08:00
|
|
|
"../../frame/dbus/sni/*.h" "../../frame/dbus/sni/*.cpp"
|
2018-10-25 17:48:55 +08:00
|
|
|
"../../frame/dbus/dbusmenu.h" "../../frame/dbus/dbusmenu.cpp"
|
|
|
|
"../../frame/dbus/dbusmenumanager.h" "../../frame/dbus/dbusmenumanager.cpp")
|
2018-03-05 21:25:21 +08:00
|
|
|
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
find_package(Qt5Widgets REQUIRED)
|
|
|
|
find_package(Qt5Svg REQUIRED)
|
|
|
|
find_package(Qt5DBus REQUIRED)
|
|
|
|
find_package(Qt5X11Extras REQUIRED)
|
|
|
|
find_package(DtkWidget REQUIRED)
|
|
|
|
|
2019-07-15 12:27:04 +08:00
|
|
|
pkg_check_modules(XCB_LIBS REQUIRED xcb-ewmh xcb xcb-image xcb-composite xtst x11 xext xcb-icccm dbusmenu-qt5)
|
2018-10-23 20:06:46 +08:00
|
|
|
pkg_check_modules(DDE-Network-Utils REQUIRED dde-network-utils)
|
|
|
|
pkg_check_modules(DFrameworkDBus REQUIRED dframeworkdbus)
|
2019-01-07 20:33:15 +08:00
|
|
|
pkg_check_modules(QGSettings REQUIRED gsettings-qt)
|
2018-03-05 21:25:21 +08:00
|
|
|
|
|
|
|
add_definitions("${QT_DEFINITIONS} -DQT_PLUGIN")
|
2018-11-13 20:07:52 +08:00
|
|
|
add_library(${PLUGIN_NAME} SHARED ${SRCS} tray.qrc)
|
2018-03-05 21:25:21 +08:00
|
|
|
set_target_properties(${PLUGIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../)
|
|
|
|
target_include_directories(${PLUGIN_NAME} PUBLIC ${DtkWidget_INCLUDE_DIRS}
|
|
|
|
${Qt5DBus_INCLUDE_DIRS}
|
|
|
|
${XCB_LIBS_INCLUDE_DIRS}
|
2018-10-23 20:06:46 +08:00
|
|
|
${DDE-Network-Utils_INCLUDE_DIRS}
|
|
|
|
${DFrameworkDBus_INCLUDE_DIRS}
|
2019-01-07 20:33:15 +08:00
|
|
|
${QGSettings_INCLUDE_DIRS}
|
2018-10-24 18:09:44 +08:00
|
|
|
../../interfaces
|
|
|
|
../../frame)
|
2018-03-05 21:25:21 +08:00
|
|
|
target_link_libraries(${PLUGIN_NAME} PRIVATE
|
|
|
|
${DtkWidget_LIBRARIES}
|
|
|
|
${Qt5Widgets_LIBRARIES}
|
|
|
|
${Qt5X11Extras_LIBRARIES}
|
|
|
|
${Qt5DBus_LIBRARIES}
|
|
|
|
${Qt5Svg_LIBRARIES}
|
|
|
|
${XCB_LIBS_LIBRARIES}
|
2018-10-23 20:06:46 +08:00
|
|
|
${DDE-Network-Utils_LIBRARIES}
|
|
|
|
${DFrameworkDBus_LIBRARIES}
|
2019-01-07 20:33:15 +08:00
|
|
|
${QGSettings_LIBRARIES}
|
2019-07-15 12:27:04 +08:00
|
|
|
pthread
|
2018-03-05 21:25:21 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins)
|