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)
|
|
|
|
|
|
|
|
# Sources files
|
2018-07-04 16:17:01 +08:00
|
|
|
file(GLOB_RECURSE SRCS "*.h" "*.cpp" "../widgets/*.h" "../widgets/*.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)
|
2018-03-05 21:25:21 +08:00
|
|
|
find_package(DtkWidget REQUIRED)
|
2019-07-05 15:08:52 +08:00
|
|
|
find_package(DtkCMake REQUIRED)
|
2018-03-05 21:25:21 +08:00
|
|
|
|
|
|
|
pkg_check_modules(XCB_EWMH REQUIRED xcb-ewmh x11)
|
|
|
|
pkg_check_modules(DFrameworkDBus REQUIRED dframeworkdbus)
|
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
|
|
|
|
|
|
|
# driver-manager
|
2021-04-07 10:41:13 +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}
|
|
|
|
${DFrameworkDBus_INCLUDE_DIRS}
|
|
|
|
${Qt5Gui_PRIVATE_INCLUDE_DIRS}
|
|
|
|
${PROJECT_BINARY_DIR}
|
|
|
|
${QGSettings_INCLUDE_DIRS}
|
|
|
|
${DtkGUI_INCLUDE_DIRS}
|
|
|
|
${Qt5Svg_INCLUDE_DIRS}
|
|
|
|
../interfaces
|
2021-04-07 10:41:13 +08:00
|
|
|
../widgets
|
|
|
|
accessible
|
|
|
|
controller
|
|
|
|
dbus
|
2021-04-12 16:53:03 +08:00
|
|
|
display
|
2021-04-07 10:41:13 +08:00
|
|
|
item
|
|
|
|
item/components
|
2021-03-12 13:20:13 +08:00
|
|
|
util
|
2021-04-07 10:41:13 +08:00
|
|
|
window
|
|
|
|
xcb
|
|
|
|
../plugins/tray
|
|
|
|
../plugins/show-desktop
|
|
|
|
../plugins/network
|
|
|
|
../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}
|
|
|
|
${DFrameworkDBus_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}
|
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)
|