2023-02-20 10:36:55 +08:00
|
|
|
cmake_minimum_required(VERSION 3.16)
|
2018-03-05 21:25:21 +08:00
|
|
|
|
|
|
|
set(BIN_NAME dde-dock)
|
|
|
|
|
|
|
|
configure_file(environments.h.in environments.h @ONLY)
|
|
|
|
|
2021-05-25 13:05:45 +08:00
|
|
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
2022-08-12 08:13:00 +00:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -fsanitize=address -O0")
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fsanitize=address -O0")
|
2021-05-25 13:05:45 +08:00
|
|
|
endif()
|
|
|
|
|
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
|
2023-01-12 13:09:17 +08:00
|
|
|
file(GLOB_RECURSE SRCS "*.h" "*.cpp" "../widgets/*.h" "../widgets/*.cpp" "../interfaces/*.h")
|
2018-03-05 21:25:21 +08:00
|
|
|
|
|
|
|
# Find the library
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
find_package(Qt5Widgets REQUIRED)
|
|
|
|
find_package(Qt5Concurrent REQUIRED)
|
|
|
|
find_package(Qt5X11Extras REQUIRED)
|
|
|
|
find_package(Qt5DBus REQUIRED)
|
2019-11-05 21:04:07 +08:00
|
|
|
find_package(Qt5Svg REQUIRED)
|
2022-08-12 08:13:00 +00:00
|
|
|
find_package(Qt5WaylandClient REQUIRED)
|
|
|
|
find_package(Qt5XkbCommonSupport REQUIRED)
|
2023-02-20 10:36:55 +08:00
|
|
|
find_package(DtkGui REQUIRED)
|
2018-03-05 21:25:21 +08:00
|
|
|
find_package(DtkWidget REQUIRED)
|
2019-07-05 15:08:52 +08:00
|
|
|
find_package(DtkCMake REQUIRED)
|
2022-05-12 17:09:10 +08:00
|
|
|
find_package(dbusmenu-qt5 REQUIRED)
|
2023-02-20 10:36:55 +08:00
|
|
|
find_package(ECM REQUIRED NO_MODULE)
|
|
|
|
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
|
|
|
find_package(DWayland REQUIRED)
|
2018-03-05 21:25:21 +08:00
|
|
|
|
2023-02-20 10:36:55 +08:00
|
|
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
|
|
|
find_package(Threads REQUIRED)
|
2018-03-05 21:25:21 +08:00
|
|
|
|
2023-06-13 15:05:44 +08:00
|
|
|
pkg_check_modules(XCB_EWMH REQUIRED IMPORTED_TARGET x11 xcb xcb-icccm xcb-image xcb-ewmh xcb-composite xtst dbusmenu-qt5 xext xcursor xkbcommon xres)
|
2023-02-20 10:36:55 +08:00
|
|
|
pkg_check_modules(QGSettings REQUIRED IMPORTED_TARGET gsettings-qt)
|
2023-04-30 23:00:04 +08:00
|
|
|
pkg_check_modules(WAYLAND REQUIRED IMPORTED_TARGET wayland-client wayland-cursor wayland-egl)
|
2022-08-12 08:13:00 +00:00
|
|
|
|
2018-03-05 21:25:21 +08:00
|
|
|
# driver-manager
|
2021-09-22 13:12:27 +08:00
|
|
|
add_executable(${BIN_NAME}
|
|
|
|
${SRCS}
|
|
|
|
${INTERFACES}
|
|
|
|
${SRC_PATH}
|
|
|
|
item/item.qrc)
|
2020-12-16 17:38:41 +08:00
|
|
|
|
|
|
|
target_include_directories(${BIN_NAME} PUBLIC
|
|
|
|
${DtkWidget_INCLUDE_DIRS}
|
|
|
|
${PROJECT_BINARY_DIR}
|
2022-08-12 08:13:00 +00:00
|
|
|
${Qt5WaylandClient_PRIVATE_INCLUDE_DIRS}
|
2020-12-16 17:38:41 +08:00
|
|
|
../interfaces
|
2021-04-07 10:41:13 +08:00
|
|
|
../widgets
|
2022-09-16 20:12:52 +00:00
|
|
|
./dbusinterface/generation_dbus_interface
|
|
|
|
./qtdbusextended/
|
|
|
|
./dbusinterface
|
2021-04-07 10:41:13 +08:00
|
|
|
accessible
|
|
|
|
controller
|
|
|
|
dbus
|
2021-04-12 16:53:03 +08:00
|
|
|
display
|
2021-04-07 10:41:13 +08:00
|
|
|
item
|
|
|
|
item/components
|
2022-05-12 17:35:50 +08:00
|
|
|
model
|
2022-10-28 10:00:09 +00:00
|
|
|
pluginadapter
|
2022-08-12 08:13:00 +00:00
|
|
|
screenspliter
|
2021-03-12 13:20:13 +08:00
|
|
|
util
|
2021-04-07 10:41:13 +08:00
|
|
|
window
|
2021-09-22 13:12:27 +08:00
|
|
|
window/components
|
2022-05-12 17:09:10 +08:00
|
|
|
window/tray
|
|
|
|
window/tray/widgets
|
2022-12-12 10:30:44 +00:00
|
|
|
drag
|
2021-04-07 10:41:13 +08:00
|
|
|
xcb
|
|
|
|
../plugins/tray
|
|
|
|
../plugins/show-desktop
|
|
|
|
../plugins/datetime
|
|
|
|
../plugins/onboard
|
|
|
|
../plugins/trash
|
|
|
|
../plugins/shutdown
|
|
|
|
../plugins/multitasking
|
|
|
|
../plugins/overlay-warning
|
2020-12-16 17:38:41 +08:00
|
|
|
)
|
2020-03-13 12:59:02 +08:00
|
|
|
|
2018-03-05 21:25:21 +08:00
|
|
|
target_link_libraries(${BIN_NAME} PRIVATE
|
|
|
|
${DtkWidget_LIBRARIES}
|
2023-02-20 10:36:55 +08:00
|
|
|
PkgConfig::QGSettings
|
|
|
|
PkgConfig::XCB_EWMH
|
2023-04-30 23:00:04 +08:00
|
|
|
PkgConfig::WAYLAND
|
2023-02-20 10:36:55 +08:00
|
|
|
Dtk::Gui
|
|
|
|
Qt5::Widgets
|
|
|
|
Qt5::Gui
|
|
|
|
Qt5::Concurrent
|
|
|
|
Qt5::X11Extras
|
|
|
|
Qt5::DBus
|
|
|
|
Qt5::Svg
|
|
|
|
Qt5::WaylandClient
|
|
|
|
Qt5::XkbCommonSupport
|
|
|
|
DWaylandClient
|
|
|
|
Threads::Threads
|
|
|
|
-lm
|
2018-03-05 21:25:21 +08:00
|
|
|
)
|
|
|
|
|
2019-07-05 17:06:50 +08:00
|
|
|
if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "sw_64")
|
|
|
|
target_compile_definitions(${BIN_NAME} PUBLIC DISABLE_SHOW_ANIMATION)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "mips64")
|
|
|
|
target_compile_definitions(${BIN_NAME} PUBLIC DISABLE_SHOW_ANIMATION)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
|
|
|
|
target_compile_definitions(${BIN_NAME} PUBLIC DISABLE_SHOW_ANIMATION)
|
|
|
|
endif()
|
|
|
|
|
2018-03-05 21:25:21 +08:00
|
|
|
# bin
|
2023-02-20 10:36:55 +08:00
|
|
|
install(TARGETS ${BIN_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2023-06-13 15:05:44 +08:00
|
|
|
# window_patterns
|
|
|
|
install(FILES taskmanager/window_patterns.json DESTINATION ${CMAKE_INSTALL_DATADIR}/dde-dock/)
|