dde-dock/plugins/trash/CMakeLists.txt
tsic404 223a9df0d7 fix: incorrect trash status when deleting file in other partition
The old implementation only monitor the trash folder in user's partition
It will make other partition's recycle bin out of monitor,
Now use GIO to monitor all trash and empty trash

log: Fix the trash icon status might out-of-sync in some cases
2023-05-31 03:21:28 +00:00

46 lines
1.3 KiB
CMake

set(PLUGIN_NAME "trash")
project(${PLUGIN_NAME})
generation_dbus_interface(${CMAKE_CURRENT_SOURCE_DIR}/dbusinterface/xml ${CMAKE_CURRENT_SOURCE_DIR}/dbusinterface/generation_dbus_interface)
# Sources files
file(GLOB_RECURSE SRCS "*.h"
"*.cpp"
"../../widgets/tipswidget.h"
"../../widgets/tipswidget.cpp"
"../../frame/util/imageutil.h"
"../../frame/util/imageutil.cpp"
"../../frame/qtdbusextended/*.h"
"../../frame/qtdbusextended/*.cpp")
find_package(PkgConfig REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Svg REQUIRED)
find_package(Qt5DBus REQUIRED)
find_package(DtkWidget REQUIRED)
pkg_check_modules(XCB_LIBS REQUIRED IMPORTED_TARGET xcursor)
pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
add_definitions("${QT_DEFINITIONS} -DQT_PLUGIN")
add_library(${PLUGIN_NAME} SHARED ${SRCS} resource.qrc)
set_target_properties(${PLUGIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../)
target_include_directories(${PLUGIN_NAME} PUBLIC
${DtkWidget_INCLUDE_DIRS}
../../interfaces
./dbusinterface/generation_dbus_interface
../../frame/qtdbusextended)
target_link_libraries(${PLUGIN_NAME} PRIVATE
${DtkWidget_LIBRARIES}
PkgConfig::XCB_LIBS
Qt5::Widgets
Qt5::DBus
Qt5::Svg
PkgConfig::GIO)
install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins)