2018-03-05 21:25:21 +08:00
|
|
|
|
|
|
|
set(PLUGIN_NAME "trash")
|
|
|
|
|
|
|
|
project(${PLUGIN_NAME})
|
|
|
|
|
2022-09-16 20:12:52 +00:00
|
|
|
generation_dbus_interface(${CMAKE_CURRENT_SOURCE_DIR}/dbusinterface/xml ${CMAKE_CURRENT_SOURCE_DIR}/dbusinterface/generation_dbus_interface)
|
|
|
|
|
2018-03-05 21:25:21 +08:00
|
|
|
# Sources files
|
2022-09-27 02:58:33 +00:00
|
|
|
file(GLOB_RECURSE SRCS "*.h"
|
2022-09-16 20:12:52 +00:00
|
|
|
"*.cpp"
|
2022-11-02 05:29:15 +00:00
|
|
|
"../../widgets/tipswidget.h"
|
|
|
|
"../../widgets/tipswidget.cpp"
|
2023-03-08 11:56:28 +08:00
|
|
|
"../../frame/util/imageutil.h"
|
|
|
|
"../../frame/util/imageutil.cpp"
|
2022-09-16 20:12:52 +00:00
|
|
|
"../../frame/qtdbusextended/*.h"
|
|
|
|
"../../frame/qtdbusextended/*.cpp")
|
2018-03-05 21:25:21 +08:00
|
|
|
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
find_package(Qt5Widgets REQUIRED)
|
|
|
|
find_package(Qt5Svg REQUIRED)
|
2021-08-20 10:19:10 +08:00
|
|
|
find_package(Qt5DBus REQUIRED)
|
2018-03-05 21:25:21 +08:00
|
|
|
find_package(DtkWidget REQUIRED)
|
2023-11-28 17:16:49 +08:00
|
|
|
find_package(DtkGui REQUIRED)
|
2018-03-05 21:25:21 +08:00
|
|
|
|
2023-03-22 20:11:24 +08:00
|
|
|
pkg_check_modules(XCB_LIBS REQUIRED IMPORTED_TARGET xcursor)
|
2023-05-29 15:39:25 +08:00
|
|
|
pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
|
2023-03-22 20:11:24 +08:00
|
|
|
|
2018-03-05 21:25:21 +08:00
|
|
|
add_definitions("${QT_DEFINITIONS} -DQT_PLUGIN")
|
2019-10-22 14:53:30 +08:00
|
|
|
add_library(${PLUGIN_NAME} SHARED ${SRCS} resource.qrc)
|
2018-03-05 21:25:21 +08:00
|
|
|
set_target_properties(${PLUGIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../)
|
2021-08-20 10:19:10 +08:00
|
|
|
|
|
|
|
target_include_directories(${PLUGIN_NAME} PUBLIC
|
2022-09-16 20:12:52 +00:00
|
|
|
../../interfaces
|
|
|
|
./dbusinterface/generation_dbus_interface
|
|
|
|
../../frame/qtdbusextended)
|
2021-08-20 10:19:10 +08:00
|
|
|
|
2018-03-05 21:25:21 +08:00
|
|
|
target_link_libraries(${PLUGIN_NAME} PRIVATE
|
2023-11-28 17:16:49 +08:00
|
|
|
Dtk::Widget
|
|
|
|
Dtk::Gui
|
2023-03-22 20:11:24 +08:00
|
|
|
PkgConfig::XCB_LIBS
|
|
|
|
Qt5::Widgets
|
|
|
|
Qt5::DBus
|
2023-05-29 15:39:25 +08:00
|
|
|
Qt5::Svg
|
|
|
|
PkgConfig::GIO)
|
2018-03-05 21:25:21 +08:00
|
|
|
|
|
|
|
install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins)
|