2018-03-05 21:25:21 +08:00
|
|
|
cmake_minimum_required(VERSION 3.7)
|
|
|
|
|
|
|
|
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
|
2022-09-16 20:12:52 +00:00
|
|
|
file(GLOB_RECURSE SRCS "*.h"
|
|
|
|
"*.cpp"
|
|
|
|
"../widgets/*.h"
|
|
|
|
"../widgets/*.cpp"
|
|
|
|
"./dbusinterface/generation_dbus_interface/*.h"
|
|
|
|
"./dbusinterface/generation_dbus_interface/*.cpp"
|
|
|
|
"./qtdbusextended/*.h"
|
|
|
|
"./qtdbusextended/*.cpp"
|
|
|
|
"./dbusinterface/types/*.h"
|
|
|
|
"./dbusinterface/types/*.cpp")
|
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)
|
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)
|
2018-03-05 21:25:21 +08:00
|
|
|
|
2022-05-12 17:09:10 +08:00
|
|
|
pkg_check_modules(XCB_EWMH REQUIRED xcb-image xcb-ewmh xcb-composite xtst x11 dbusmenu-qt5 xext xcursor)
|
2018-05-04 14:23:58 +08:00
|
|
|
pkg_check_modules(QGSettings REQUIRED gsettings-qt)
|
2019-08-28 21:31:03 +08:00
|
|
|
pkg_check_modules(DtkGUI REQUIRED dtkgui)
|
2018-03-05 21:25:21 +08:00
|
|
|
|
2022-08-12 08:13:00 +00:00
|
|
|
set(Wayland_INCLUDE_DIRS /usr/include/DWayland/Client)
|
|
|
|
set(Wayland_LIBRARIES /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/libDWaylandClient.so)
|
|
|
|
|
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}
|
|
|
|
${XCB_EWMH_INCLUDE_DIRS}
|
|
|
|
${Qt5Gui_PRIVATE_INCLUDE_DIRS}
|
|
|
|
${PROJECT_BINARY_DIR}
|
|
|
|
${QGSettings_INCLUDE_DIRS}
|
|
|
|
${DtkGUI_INCLUDE_DIRS}
|
|
|
|
${Qt5Svg_INCLUDE_DIRS}
|
2022-05-12 17:09:10 +08:00
|
|
|
${dbusmenu-qt5_INCLUDE_DIRS}
|
2022-08-12 08:13:00 +00:00
|
|
|
${Wayland_INCLUDE_DIRS}
|
|
|
|
${Qt5WaylandClient_INCLUDE_DIRS}
|
|
|
|
${Qt5WaylandClient_PRIVATE_INCLUDE_DIRS}
|
|
|
|
${Qt5XkbCommonSupport_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-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
|
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
|
|
|
|
${XCB_EWMH_LIBRARIES}
|
|
|
|
${DtkWidget_LIBRARIES}
|
|
|
|
${Qt5Widgets_LIBRARIES}
|
2021-04-22 09:56:28 +08:00
|
|
|
${Qt5Gui_LIBRARIES}
|
2018-03-05 21:25:21 +08:00
|
|
|
${Qt5Concurrent_LIBRARIES}
|
|
|
|
${Qt5X11Extras_LIBRARIES}
|
|
|
|
${Qt5DBus_LIBRARIES}
|
2018-05-04 14:23:58 +08:00
|
|
|
${QGSettings_LIBRARIES}
|
2019-08-28 21:31:03 +08:00
|
|
|
${DtkGUI_LIBRARIES}
|
2019-11-05 21:04:07 +08:00
|
|
|
${Qt5Svg_LIBRARIES}
|
2022-08-12 08:13:00 +00:00
|
|
|
${Wayland_LIBRARIES}
|
|
|
|
${Qt5Wayland_LIBRARIES}
|
|
|
|
${Qt5WaylandClient_LIBRARIES}
|
|
|
|
${Qt5XkbCommonSupport_LIBRARIES}
|
2022-05-12 17:09:10 +08:00
|
|
|
-lpthread -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
|
|
|
|
install(TARGETS ${BIN_NAME} DESTINATION bin)
|