From ba03828bb53594d812fe03d442146638ac6c897e Mon Sep 17 00:00:00 2001 From: deepin-ci-robot Date: Wed, 24 Dec 2025 11:50:30 +0000 Subject: [PATCH] sync: from linuxdeepin/dde-session-shell Synchronize source files from linuxdeepin/dde-session-shell. Source-pull-request: https://github.com/linuxdeepin/dde-session-shell/pull/48 --- CMakeLists.txt | 2 ++ plugins/assist_login/CMakeLists.txt | 2 +- plugins/assist_login/interface/CMakeLists.txt | 2 +- plugins/examples/login-plugins/login-basic/CMakeLists.txt | 2 +- plugins/examples/login-plugins/login-complex/CMakeLists.txt | 2 +- .../examples/login-plugins/login-fullManaged/CMakeLists.txt | 2 +- plugins/examples/login-plugins/login-udcp/CMakeLists.txt | 2 +- plugins/examples/tray-plugins/network/CMakeLists.txt | 2 +- plugins/examples/tray-plugins/webview/CMakeLists.txt | 2 +- plugins/one-key-login/CMakeLists.txt | 2 +- src/global_util/plugin_manager/modules_loader.cpp | 4 ++-- 11 files changed, 13 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8832348eb..49562c2e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,8 @@ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX /usr) endif () +add_definitions(-DCMAKE_INSTALL_FULL_LIBDIR=\"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}\") + set(CMAKE_CXX_STANDARD 17) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) diff --git a/plugins/assist_login/CMakeLists.txt b/plugins/assist_login/CMakeLists.txt index 6cfeea0df..a177d20ee 100644 --- a/plugins/assist_login/CMakeLists.txt +++ b/plugins/assist_login/CMakeLists.txt @@ -20,4 +20,4 @@ aux_source_directory(. SRCS) add_library(${LIB_NAME} SHARED ${SRCS}) add_subdirectory(interface) -install(TARGETS ${LIB_NAME} LIBRARY DESTINATION lib/dde-session-shell/modules) \ No newline at end of file +install(TARGETS ${LIB_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/dde-session-shell/modules) diff --git a/plugins/assist_login/interface/CMakeLists.txt b/plugins/assist_login/interface/CMakeLists.txt index 4035bd97f..c62c9e35a 100644 --- a/plugins/assist_login/interface/CMakeLists.txt +++ b/plugins/assist_login/interface/CMakeLists.txt @@ -28,4 +28,4 @@ link_libraries( # 安装/user/lib install(FILES include/assist_login_interface.h DESTINATION /usr/include/dde-session-shell) -install(TARGETS ${LIB_NAME} LIBRARY DESTINATION lib/dde-session-shell/modules) +install(TARGETS ${LIB_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/dde-session-shell/modules) diff --git a/plugins/examples/login-plugins/login-basic/CMakeLists.txt b/plugins/examples/login-plugins/login-basic/CMakeLists.txt index 65c1e5dc7..9a4910427 100644 --- a/plugins/examples/login-plugins/login-basic/CMakeLists.txt +++ b/plugins/examples/login-plugins/login-basic/CMakeLists.txt @@ -81,4 +81,4 @@ target_link_libraries(${PLUGIN_NAME} PRIVATE set(CMAKE_INSTALL_PREFIX "/usr") # 设置执行 make install 时哪个目标应该被 install 到哪个位置 -install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-session-shell/modules) +install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/dde-session-shell/modules) diff --git a/plugins/examples/login-plugins/login-complex/CMakeLists.txt b/plugins/examples/login-plugins/login-complex/CMakeLists.txt index 5edcf6129..ba2814d81 100644 --- a/plugins/examples/login-plugins/login-complex/CMakeLists.txt +++ b/plugins/examples/login-plugins/login-complex/CMakeLists.txt @@ -12,4 +12,4 @@ aux_source_directory(. SRCS) add_library(${LIB_NAME} SHARED ${SRCS}) -install(TARGETS ${LIB_NAME} LIBRARY DESTINATION lib/dde-session-shell/modules) +install(TARGETS ${LIB_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/dde-session-shell/modules) diff --git a/plugins/examples/login-plugins/login-fullManaged/CMakeLists.txt b/plugins/examples/login-plugins/login-fullManaged/CMakeLists.txt index bba76f7ac..6728045b2 100644 --- a/plugins/examples/login-plugins/login-fullManaged/CMakeLists.txt +++ b/plugins/examples/login-plugins/login-fullManaged/CMakeLists.txt @@ -12,4 +12,4 @@ aux_source_directory(. SRCS) add_library(${LIB_NAME} SHARED ${SRCS}) -install(TARGETS ${LIB_NAME} LIBRARY DESTINATION lib/dde-session-shell/modules) +install(TARGETS ${LIB_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/dde-session-shell/modules) diff --git a/plugins/examples/login-plugins/login-udcp/CMakeLists.txt b/plugins/examples/login-plugins/login-udcp/CMakeLists.txt index bdbc6f3f8..cc8a78f8b 100644 --- a/plugins/examples/login-plugins/login-udcp/CMakeLists.txt +++ b/plugins/examples/login-plugins/login-udcp/CMakeLists.txt @@ -12,4 +12,4 @@ aux_source_directory(. SRCS) add_library(${LIB_NAME} SHARED ${SRCS} login-plugin.qrc) -install(TARGETS ${LIB_NAME} LIBRARY DESTINATION lib/dde-session-shell/modules) +install(TARGETS ${LIB_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/dde-session-shell/modules) diff --git a/plugins/examples/tray-plugins/network/CMakeLists.txt b/plugins/examples/tray-plugins/network/CMakeLists.txt index b2cf5755f..f401b97a6 100644 --- a/plugins/examples/tray-plugins/network/CMakeLists.txt +++ b/plugins/examples/tray-plugins/network/CMakeLists.txt @@ -12,4 +12,4 @@ aux_source_directory(. SRCS) add_library(${LIB_NAME} SHARED ${SRCS}) -install(TARGETS ${LIB_NAME} LIBRARY DESTINATION lib/dde-session-shell/modules) +install(TARGETS ${LIB_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/dde-session-shell/modules) diff --git a/plugins/examples/tray-plugins/webview/CMakeLists.txt b/plugins/examples/tray-plugins/webview/CMakeLists.txt index d74ad2d5b..c45855bb1 100644 --- a/plugins/examples/tray-plugins/webview/CMakeLists.txt +++ b/plugins/examples/tray-plugins/webview/CMakeLists.txt @@ -23,4 +23,4 @@ target_link_libraries(${LIB_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::WebEngineWidgets ) -install(TARGETS ${LIB_NAME} LIBRARY DESTINATION lib/dde-session-shell/modules) +install(TARGETS ${LIB_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/dde-session-shell/modules) diff --git a/plugins/one-key-login/CMakeLists.txt b/plugins/one-key-login/CMakeLists.txt index 0c64477e9..5eafdc970 100644 --- a/plugins/one-key-login/CMakeLists.txt +++ b/plugins/one-key-login/CMakeLists.txt @@ -12,4 +12,4 @@ aux_source_directory(. SRCS) add_library(${LIB_NAME} SHARED ${SRCS}) -install(TARGETS ${LIB_NAME} LIBRARY DESTINATION lib/dde-session-shell/modules) +install(TARGETS ${LIB_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/dde-session-shell/modules) diff --git a/src/global_util/plugin_manager/modules_loader.cpp b/src/global_util/plugin_manager/modules_loader.cpp index bb97f0a2c..1e8b2358a 100644 --- a/src/global_util/plugin_manager/modules_loader.cpp +++ b/src/global_util/plugin_manager/modules_loader.cpp @@ -16,8 +16,8 @@ #include -const QString ModulesDir = "/usr/lib/dde-session-shell/modules"; -const QString ModulesConfigDir = "/usr/lib/dde-session-shell/modules/config.d/"; +const QString ModulesDir = QString("%1/dde-session-shell/modules").arg(CMAKE_INSTALL_FULL_LIBDIR); +const QString ModulesConfigDir = QString("%1/dde-session-shell/modules/config.d/").arg(CMAKE_INSTALL_FULL_LIBDIR); const QString LOWEST_VERSION = "1.1.0"; const QString LoginType = "Login"; const QString TrayType = "Tray";