Skip to content

Conversation

@hillwoodroc
Copy link
Contributor

This ensures correct installation and runtime lookup on both lib and lib64 based systems.

Log:

  • Define CMAKE_INSTALL_FULL_LIBDIR in top-level CMakeLists.txt
  • Replace hardcoded 'lib/dde-session-shell/modules' with '${CMAKE_INSTALL_LIBDIR}/dde-session-shell/modules' in all plugin CMakeLists
  • Update modules_loader.cpp to use CMAKE_INSTALL_FULL_LIBDIR for locating modules and configs

@deepin-ci-robot
Copy link

Hi @hillwoodroc. Thanks for your PR. 😃

deepin-ci-robot added a commit to linuxdeepin/dde-session-shell-snipe that referenced this pull request Sep 18, 2025
Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#48
@deepin-ci-robot
Copy link

Hi @hillwoodroc. Thanks for your PR.

I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

yixinshark
yixinshark previously approved these changes Sep 19, 2025
set(CMAKE_INSTALL_PREFIX /usr)
endif ()

add_definitions(-DCMAKE_INSTALL_FULL_LIBDIR=\"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}\")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

只要include 了 GNUInstallDirs 模块,CMAKE_INSTALL_FULL_LIBDIR 是可以自动生成的。不要手动拼
https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html

你可以用 “-DCMAKE_INSTALL_FULL_LIBDIR="${CMAKE_INSTALL_FULL_LIBDIR}"”

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这是为了和后面的 install 语句的 ${CMAKE_INSTALL_LIBDIR} 路径相匹配。install 语句用的相对路径。-DCMAKE_INSTALL_FULL_LIBDIR 无法直接传过去。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

install 逻辑本身就会自动拼接绝对路径,逻辑是 GNUInstallDirs_get_absolute_install_dir,只要在 include(GNUInstallDirs) 之前设置好 CMAKE_INSTALL_LIBDIR,CMAKE_INSTALL_FULL_LIBDIR 一定是正确的

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

试过,在存在 CMAKE_INSTALL_LIBDIR 的情况下,并不会自动生成 CMAKE_INSTALL_FULL_LIBDIR,还得保留这一行。

deepin-ci-robot added a commit to linuxdeepin/dde-session-shell-snipe that referenced this pull request Dec 24, 2025
Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#48
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hillwoodroc

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

1 similar comment
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hillwoodroc

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

deepin-ci-robot added a commit to linuxdeepin/dde-session-shell-snipe that referenced this pull request Dec 24, 2025
Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#48
CMakeLists.txt Outdated
cmake_minimum_required(VERSION 3.16)
project(dde-session-shell C CXX)

if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不需要, include(GNUInstallDirs) 里一定会定义

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GNUInstallDirs 定义的路径在 debian 是带架构字符路径,不是你们希望的 lib 。当然不定义这个我是没意见,反正可以自己传参数。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GNUInstallDirs 定义的路径在 debian 是带架构字符路径,不是你们希望的 lib 。当然不定义这个我是没意见,反正可以自己传参数。

deepin-ci-robot added a commit to linuxdeepin/dde-session-shell-snipe that referenced this pull request Dec 24, 2025
Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#48
deepin-ci-robot added a commit to linuxdeepin/dde-session-shell-snipe that referenced this pull request Dec 24, 2025
Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#48
This ensures correct installation and runtime lookup on both lib and
lib64 based systems.

Log:
- Define CMAKE_INSTALL_FULL_LIBDIR in top-level CMakeLists.txt
- Replace hardcoded 'lib/dde-session-shell/modules' with
  '${CMAKE_INSTALL_LIBDIR}/dde-session-shell/modules' in all plugin
  CMakeLists
- Update modules_loader.cpp to use CMAKE_INSTALL_FULL_LIBDIR for
  locating modules and configs
deepin-ci-robot added a commit to linuxdeepin/dde-session-shell-snipe that referenced this pull request Dec 24, 2025
Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants