2018-03-05 21:25:21 +08:00
|
|
|
|
2018-11-13 20:07:52 +08:00
|
|
|
set(PLUGIN_NAME "power")
|
2018-03-05 21:25:21 +08:00
|
|
|
|
|
|
|
project(${PLUGIN_NAME})
|
|
|
|
|
|
|
|
# Sources files
|
2018-07-04 16:17:01 +08:00
|
|
|
file(GLOB_RECURSE SRCS "*.h" "*.cpp" "../../widgets/*.h" "../../widgets/*.cpp")
|
2018-03-05 21:25:21 +08:00
|
|
|
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
find_package(Qt5Widgets REQUIRED)
|
|
|
|
find_package(Qt5Svg REQUIRED)
|
2018-07-31 23:03:37 +08:00
|
|
|
find_package(Qt5DBus REQUIRED)
|
2018-03-05 21:25:21 +08:00
|
|
|
find_package(DtkWidget REQUIRED)
|
|
|
|
|
2019-05-13 16:15:37 +08:00
|
|
|
pkg_check_modules(DFrameworkDBus REQUIRED dframeworkdbus)
|
|
|
|
|
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} power.qrc)
|
|
|
|
set_target_properties(${PLUGIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../system-trays)
|
2018-07-31 23:03:37 +08:00
|
|
|
target_include_directories(${PLUGIN_NAME} PUBLIC ${DtkWidget_INCLUDE_DIRS}
|
|
|
|
${Qt5DBus_INCLUDE_DIRS}
|
2019-05-13 16:15:37 +08:00
|
|
|
${DFrameworkDBus_INCLUDE_DIRS}
|
2018-07-31 23:03:37 +08:00
|
|
|
../../interfaces)
|
2018-03-05 21:25:21 +08:00
|
|
|
target_link_libraries(${PLUGIN_NAME} PRIVATE
|
|
|
|
${DtkWidget_LIBRARIES}
|
|
|
|
${Qt5Widgets_LIBRARIES}
|
|
|
|
${Qt5Svg_LIBRARIES}
|
2019-07-15 12:27:04 +08:00
|
|
|
${Qt5DBus_LIBRARIES}
|
2019-05-13 16:15:37 +08:00
|
|
|
${DFrameworkDBus_LIBRARIES}
|
2018-03-05 21:25:21 +08:00
|
|
|
)
|
|
|
|
|
2018-11-13 20:07:52 +08:00
|
|
|
install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins/system-trays)
|