2018-10-28 15:50:20 +08:00
|
|
|
|
|
|
|
set(PLUGIN_NAME "shutdown")
|
|
|
|
|
|
|
|
project(${PLUGIN_NAME})
|
|
|
|
|
|
|
|
# Sources files
|
2023-12-07 16:04:05 +08:00
|
|
|
file(GLOB_RECURSE SRCS "*.h" "*.cpp"
|
|
|
|
"../../widgets/tipswidget.h"
|
|
|
|
"../../widgets/tipswidget.cpp"
|
|
|
|
"../../frame/util/imageutil.cpp"
|
|
|
|
)
|
2018-10-28 15:50:20 +08:00
|
|
|
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
find_package(Qt5Widgets REQUIRED)
|
|
|
|
find_package(Qt5Svg REQUIRED)
|
|
|
|
find_package(Qt5DBus REQUIRED)
|
|
|
|
find_package(DtkWidget REQUIRED)
|
|
|
|
|
2019-11-12 15:07:48 +08:00
|
|
|
#if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
|
|
|
|
# add_definitions("-DDISABLE_POWER_OPTIONS")
|
|
|
|
#endif()
|
2023-03-22 20:11:24 +08:00
|
|
|
pkg_check_modules(QGSettings REQUIRED IMPORTED_TARGET gsettings-qt)
|
2024-04-17 13:56:34 +08:00
|
|
|
pkg_check_modules(Xcursor REQUIRED IMPORTED_TARGET xcursor)
|
2019-03-25 13:37:58 +08:00
|
|
|
|
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}
|
2022-11-02 05:29:15 +00:00
|
|
|
../../interfaces
|
|
|
|
../../widgets)
|
2018-10-28 15:50:20 +08:00
|
|
|
target_link_libraries(${PLUGIN_NAME} PRIVATE
|
|
|
|
${DtkWidget_LIBRARIES}
|
2023-03-22 20:11:24 +08:00
|
|
|
PkgConfig::QGSettings
|
2024-04-17 13:56:34 +08:00
|
|
|
PkgConfig::Xcursor
|
2023-03-22 20:11:24 +08:00
|
|
|
Qt5::Widgets
|
|
|
|
Qt5::DBus
|
|
|
|
Qt5::Svg)
|
2018-10-28 15:50:20 +08:00
|
|
|
|
|
|
|
install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins)
|