Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] export cmake library install #76

Merged
merged 1 commit into from
Jan 21, 2021
Merged

Conversation

tylerjw
Copy link
Member

@tylerjw tylerjw commented Nov 25, 2020

This fixes an issue with the cmake install that causes problems when using this in an underlay workspace.

When you build this in an underlay and then try to build the overlay repo where something depends on it you get an error like this:

--- stderr: moveit_core                          
moveit_core: You did not request a specific build type: Choosing 'Release' for maximum performance
CMake Error at /opt/underlay_ws/install/srdfdom/share/srdfdom/cmake/ament_cmake_export_libraries-extras.cmake:48 (message):
  Package 'srdfdom' exports the library 'srdfdom' which couldn't be found

Documentation reference: https://index.ros.org/doc/ros2/Tutorials/Ament-CMake-Documentation/

Copy link
Contributor

@rhaschke rhaschke left a comment

Choose a reason for hiding this comment

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

According to the cmake doc:

The EXPORT option associates the installed target files with an export called . It must appear before any RUNTIME, LIBRARY, or ARCHIVE options. To actually install the export file itself, call install(EXPORT), documented below.

you are missing the call to install(EXPORT), don't you? Or is this installed by ament_package()?

@tylerjw
Copy link
Member Author

tylerjw commented Nov 25, 2020

I think it is done by ament_package, because this change fixes the build error I saw.

@tylerjw tylerjw merged commit 91c35c9 into moveit:ros2 Jan 21, 2021
@tylerjw tylerjw deleted the fix_cmake_install branch January 21, 2021 22:01
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.

None yet

2 participants