2018-03-05 21:25:21 +08:00
|
|
|
|
|
|
|
set(PLUGIN_NAME "datetime")
|
|
|
|
|
|
|
|
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-16 20:12:52 +00:00
|
|
|
file(GLOB_RECURSE SRCS "*.h"
|
|
|
|
"*.cpp"
|
|
|
|
"../../widgets/*.h"
|
|
|
|
"../../widgets/*.cpp"
|
|
|
|
"./dbusinterface/*.h"
|
|
|
|
"./dbusinterface/*.cpp"
|
|
|
|
"../../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)
|
2018-04-16 15:44:35 +08:00
|
|
|
find_package(Qt5DBus REQUIRED)
|
2018-03-05 21:25:21 +08:00
|
|
|
find_package(DtkWidget REQUIRED)
|
|
|
|
|
2020-08-19 14:13:35 +08:00
|
|
|
pkg_check_modules(QGSettings REQUIRED gsettings-qt)
|
|
|
|
|
2018-03-05 21:25:21 +08:00
|
|
|
add_definitions("${QT_DEFINITIONS} -DQT_PLUGIN")
|
2018-08-08 14:37:20 +08:00
|
|
|
add_library(${PLUGIN_NAME} SHARED ${SRCS} datetime.qrc)
|
2018-03-05 21:25:21 +08:00
|
|
|
set_target_properties(${PLUGIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../)
|
2020-08-19 14:13:35 +08:00
|
|
|
target_include_directories(${PLUGIN_NAME} PUBLIC
|
|
|
|
${DtkWidget_INCLUDE_DIRS}
|
|
|
|
${QGSettings_INCLUDE_DIRS}
|
2022-09-16 20:12:52 +00:00
|
|
|
../../interfaces
|
|
|
|
../../frame/qtdbusextended
|
|
|
|
./dbusinterface/
|
|
|
|
./dbusinterface/generation_dbus_interface)
|
|
|
|
|
2018-03-05 21:25:21 +08:00
|
|
|
target_link_libraries(${PLUGIN_NAME} PRIVATE
|
2018-04-16 15:44:35 +08:00
|
|
|
${Qt5DBus_LIBRARIES}
|
|
|
|
${DtkWidget_LIBRARIES}
|
|
|
|
${Qt5Widgets_LIBRARIES}
|
|
|
|
${Qt5Svg_LIBRARIES}
|
2020-08-19 14:13:35 +08:00
|
|
|
${QGSettings_LIBRARIES}
|
2018-03-05 21:25:21 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins)
|