Skip to content

Install this project exports in share#790

Merged
nim65s merged 1 commit intojrl-umi3218:masterfrom
nim65s:share
Nov 7, 2025
Merged

Install this project exports in share#790
nim65s merged 1 commit intojrl-umi3218:masterfrom
nim65s:share

Conversation

@nim65s
Copy link
Collaborator

@nim65s nim65s commented Nov 7, 2025

Hi,

#786 was not enough to teach ROS this package is arch independent, because the buildfarm still use -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu: https://build.ros2.org/job/Rbin_uN64__jrl_cmakemodules__ubuntu_noble_amd64__binary/3/console

And we install CMake exports in that LIBDIR:

set(CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")

I think a proper fix on our side would be to expose a boolean option for arch independent packages, and install in <prefix>/(lib/<arch>|lib*|share)/cmake/<name>*/ with either CMAKE_INSTALL_LIBDIR or CMAKE_INSTALL_DATAROOTDIR depending on that option.

And while here we could go instead to <prefix>/<name>*/(lib/<arch>|lib*|share)/cmake/<name>*/ which should work both on Unix and Windows. (I don't know why our current setting seems to work on windows, but the doc says it does not)

ref. https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure

@ahoarau @jorisv : what would you think of something like ${PROJECT_NAME}/{CMAKE_INSTALL_LIB_OR_DATAROOT_DIR}/cmake/${PROJECT_NAME} for the v2 ?

But for now, a dirty workaround is just to force CMAKE_INSTALL_LIBDIR to CMAKE_INSTALL_DATAROOTDIR in the installation of this package.

Also cc @MaximilienNaveau for the ROS issues.

@nim65s
Copy link
Collaborator Author

nim65s commented Nov 7, 2025

I don't know any better way to test this than merge it, release, push that release to ROS, and wait for build.ros2.org to tell me what is wrong.

So I'll go ahead and do this. For the discussions about the proper fix, this can be offline.

@nim65s nim65s merged commit e712421 into jrl-umi3218:master Nov 7, 2025
5 checks passed
@nim65s nim65s deleted the share branch November 7, 2025 13:15
nim65s added a commit to nim65s/dockgen that referenced this pull request Nov 19, 2025
nim65s added a commit to nim65s/dockgen that referenced this pull request Nov 19, 2025
@MaximilienNaveau
Copy link
Contributor

This is a success on humble at least. the binary are at the proper version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants