2018-10-28 15:50:20 +08:00
|
|
|
|
|
|
|
set(PLUGIN_NAME "shutdown")
|
|
|
|
|
|
|
|
project(${PLUGIN_NAME})
|
|
|
|
|
|
|
|
# Sources files
|
|
|
|
file(GLOB_RECURSE SRCS "*.h" "*.cpp" "../../widgets/*.h" "../../widgets/*.cpp")
|
|
|
|
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
find_package(Qt5Widgets REQUIRED)
|
|
|
|
find_package(Qt5Svg REQUIRED)
|
|
|
|
find_package(Qt5DBus REQUIRED)
|
|
|
|
find_package(DtkWidget REQUIRED)
|
|
|
|
|
2019-04-01 11:25:59 +08:00
|
|
|
if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
|
2019-03-25 13:37:58 +08:00
|
|
|
add_definitions("-DDISABLE_POWER_OPTIONS")
|
|
|
|
endif()
|
|
|
|
|
2018-10-28 15:50:20 +08:00
|
|
|
add_definitions("${QT_DEFINITIONS} -DQT_PLUGIN")
|
|
|
|
add_library(${PLUGIN_NAME} SHARED ${SRCS} shutdown.qrc)
|
|
|
|
set_target_properties(${PLUGIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../)
|
|
|
|
target_include_directories(${PLUGIN_NAME} PUBLIC ${DtkWidget_INCLUDE_DIRS}
|
|
|
|
${Qt5DBus_INCLUDE_DIRS}
|
|
|
|
../../interfaces)
|
|
|
|
target_link_libraries(${PLUGIN_NAME} PRIVATE
|
|
|
|
${DtkWidget_LIBRARIES}
|
|
|
|
${Qt5Widgets_LIBRARIES}
|
|
|
|
${Qt5Svg_LIBRARIES}
|
2019-07-15 12:27:04 +08:00
|
|
|
${Qt5DBus_LIBRARIES}
|
2018-10-28 15:50:20 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins)
|