dde-dock/plugins/system-tray/CMakeLists.txt
listenerri 6224d76f98 refacotr: merge other plugins to system-tray
merge sound, shutdown, network plugins to system-tray

Change-Id: Iab7aef4c56d3e1c24b408c323ef03a8276ff43f2
2018-10-24 14:12:46 +08:00

42 lines
1.6 KiB
CMake

set(PLUGIN_NAME "system-tray")
project(${PLUGIN_NAME})
# Sources files
file(GLOB_RECURSE SRCS "*.h" "*.cpp" "../../widgets/*.h" "../../widgets/*.cpp"
"../../frame/util/themeappicon.h" "../../frame/util/themeappicon.cpp")
find_package(PkgConfig REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Svg REQUIRED)
find_package(Qt5DBus REQUIRED)
find_package(Qt5X11Extras REQUIRED)
find_package(DtkWidget REQUIRED)
pkg_check_modules(XCB_LIBS REQUIRED xcb-ewmh xcb xcb-image xcb-composite xtst xcb-icccm dbusmenu-qt5)
pkg_check_modules(DDE-Network-Utils REQUIRED dde-network-utils)
pkg_check_modules(DFrameworkDBus REQUIRED dframeworkdbus)
add_definitions("${QT_DEFINITIONS} -DQT_PLUGIN")
add_library(${PLUGIN_NAME} SHARED ${SRCS} system-tray.qrc)
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}
${DDE-Network-Utils_INCLUDE_DIRS}
${DFrameworkDBus_INCLUDE_DIRS}
../../interfaces)
target_link_libraries(${PLUGIN_NAME} PRIVATE
${DtkWidget_LIBRARIES}
${Qt5Widgets_LIBRARIES}
${Qt5X11Extras_LIBRARIES}
${Qt5DBus_LIBRARIES}
${Qt5Svg_LIBRARIES}
${XCB_LIBS_LIBRARIES}
${DDE-Network-Utils_LIBRARIES}
${DFrameworkDBus_LIBRARIES}
)
install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins)