From 15e022eea9b2d68f1fa013ec37880c5fb0b66fa0 Mon Sep 17 00:00:00 2001 From: hillwoodroc Date: Tue, 1 Mar 2022 09:49:32 +0800 Subject: [PATCH] fix: Link some libraries 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 Date: Wed Feb 23 20:12:58 2022 +0800 --- plugins/airplane-mode/CMakeLists.txt | 2 ++ plugins/bluetooth/CMakeLists.txt | 2 ++ plugins/onboard/CMakeLists.txt | 4 ++++ plugins/sound/CMakeLists.txt | 2 ++ plugins/tray/CMakeLists.txt | 2 +- 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/airplane-mode/CMakeLists.txt b/plugins/airplane-mode/CMakeLists.txt index c23992a96..35df5c525 100644 --- a/plugins/airplane-mode/CMakeLists.txt +++ b/plugins/airplane-mode/CMakeLists.txt @@ -12,6 +12,7 @@ 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) @@ -27,6 +28,7 @@ target_include_directories(${PLUGIN_NAME} PUBLIC ${DtkWidget_INCLUDE_DIRS} ../../frame/util ) target_link_libraries(${PLUGIN_NAME} PRIVATE + ${XCB_EWMH_LIBRARIES} ${DtkWidget_LIBRARIES} ${DFrameworkDBus_LIBRARIES} ${QGSettings_LIBRARIES} diff --git a/plugins/bluetooth/CMakeLists.txt b/plugins/bluetooth/CMakeLists.txt index 9822bdf36..fe091ff8c 100644 --- a/plugins/bluetooth/CMakeLists.txt +++ b/plugins/bluetooth/CMakeLists.txt @@ -15,6 +15,7 @@ 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) @@ -29,6 +30,7 @@ target_include_directories(${PLUGIN_NAME} PUBLIC ${DtkWidget_INCLUDE_DIRS} componments) target_link_libraries(${PLUGIN_NAME} PRIVATE + ${XCB_EWMH_LIBRARIES} ${DtkWidget_LIBRARIES} ${DFrameworkDBus_LIBRARIES} ${QGSettings_LIBRARIES} diff --git a/plugins/onboard/CMakeLists.txt b/plugins/onboard/CMakeLists.txt index 4308513c7..46b95e2c7 100644 --- a/plugins/onboard/CMakeLists.txt +++ b/plugins/onboard/CMakeLists.txt @@ -9,6 +9,7 @@ file(GLOB_RECURSE SRCS "*.h" "*.cpp" "../../widgets/*.h" "../../widgets/*.cpp") find_package(PkgConfig REQUIRED) find_package(Qt5Widgets REQUIRED) find_package(Qt5DBus REQUIRED) +find_package(DtkGui REQUIRED) find_package(DtkWidget REQUIRED) add_definitions("${QT_DEFINITIONS} -DQT_PLUGIN") @@ -19,6 +20,9 @@ target_include_directories(${PLUGIN_NAME} PUBLIC ${Qt5DBus_INCLUDE_DIRS} ../../interfaces) target_link_libraries(${PLUGIN_NAME} PRIVATE ${Qt5Widgets_LIBRARIES} + ${Qt5DBus_LIBRARIES} + ${DtkGui_LIBRARIES} + ${DtkWidget_LIBRARIES} ${DFrameworkDBus_LIBRARIES} ) diff --git a/plugins/sound/CMakeLists.txt b/plugins/sound/CMakeLists.txt index fd4fac0d9..20f3b3dfc 100644 --- a/plugins/sound/CMakeLists.txt +++ b/plugins/sound/CMakeLists.txt @@ -13,6 +13,7 @@ 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) @@ -29,6 +30,7 @@ target_include_directories(${PLUGIN_NAME} PUBLIC ${DtkWidget_INCLUDE_DIRS} target_link_libraries(${PLUGIN_NAME} PRIVATE ${DtkWidget_LIBRARIES} + ${XCB_EWMH_LIBRARIES} ${DFrameworkDBus_LIBRARIES} ${QGSettings_LIBRARIES} ${Qt5DBus_LIBRARIES} diff --git a/plugins/tray/CMakeLists.txt b/plugins/tray/CMakeLists.txt index ab840097a..630151e2e 100644 --- a/plugins/tray/CMakeLists.txt +++ b/plugins/tray/CMakeLists.txt @@ -26,7 +26,7 @@ find_package(Qt5Concurrent REQUIRED) find_package(DtkWidget REQUIRED) find_package(dbusmenu-qt5 REQUIRED) -pkg_check_modules(XCB_LIBS REQUIRED xcb-ewmh xcb xcb-image xcb-composite xtst x11 xext xcb-icccm dbusmenu-qt5) +pkg_check_modules(XCB_LIBS REQUIRED xcb-ewmh xcb xcb-image xcb-composite xtst x11 xext xcb-icccm dbusmenu-qt5 xcursor) pkg_check_modules(DFrameworkDBus REQUIRED dframeworkdbus) pkg_check_modules(QGSettings REQUIRED gsettings-qt)