mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00

There is a warining on deepin after build while a error on the other distributions. Because of unlink some libs like libxcursor. Log: Link some libraries Influence: airplane-mode,bluetooth,onboard,sound,tray Issue: https://github.com/linuxdeepin/developer-center/issues/2244 Change-Id: I3c293ad99aef22a42539943cb93a6e50809b4b21 Author: Hillwood Yang <hillwood@opensuse.org> Date: Wed Feb 23 20:12:58 2022 +0800
41 lines
1.3 KiB
CMake
41 lines
1.3 KiB
CMake
|
|
set(PLUGIN_NAME "airplane-mode")
|
|
|
|
project(${PLUGIN_NAME})
|
|
|
|
# Sources files
|
|
file(GLOB_RECURSE SRCS "*.h" "*.cpp" "../../widgets/*.h" "../../widgets/*.cpp" "../../frame/util/imageutil.h" "../../frame/util/imageutil.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_EWMH REQUIRED xcb-ewmh x11 xcursor)
|
|
pkg_check_modules(DFrameworkDBus REQUIRED dframeworkdbus)
|
|
pkg_check_modules(QGSettings REQUIRED gsettings-qt)
|
|
|
|
add_definitions("${QT_DEFINITIONS} -DQT_PLUGIN")
|
|
add_library(${PLUGIN_NAME} SHARED ${SRCS} resources/airplane_mode.qrc)
|
|
set_target_properties(${PLUGIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../system-trays)
|
|
target_include_directories(${PLUGIN_NAME} PUBLIC ${DtkWidget_INCLUDE_DIRS}
|
|
${DFrameworkDBus_INCLUDE_DIRS}
|
|
${QGSettings_INCLUDE_DIRS}
|
|
../../interfaces
|
|
../../widgets
|
|
../../frame
|
|
../../frame/util
|
|
)
|
|
target_link_libraries(${PLUGIN_NAME} PRIVATE
|
|
${XCB_EWMH_LIBRARIES}
|
|
${DtkWidget_LIBRARIES}
|
|
${DFrameworkDBus_LIBRARIES}
|
|
${QGSettings_LIBRARIES}
|
|
${Qt5DBus_LIBRARIES}
|
|
${Qt5Widgets_LIBRARIES}
|
|
${Qt5Svg_LIBRARIES}
|
|
)
|
|
|
|
install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins/system-trays)
|