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

build shared lib only if BUILD_SHARED_LIBS is set #62

Merged
merged 2 commits into from
Jul 12, 2022

Conversation

hannes09
Copy link
Contributor

Signed-off-by: Hannes Harms h.harms@grimme.de

Signed-off-by: Hannes Harms <h.harms@grimme.de>
@methylDragon
Copy link
Contributor

Hiya! Could I check for the reason for why you'd like to no longer be forcing SHARED library builds?

@hannes09
Copy link
Contributor Author

hannes09 commented May 23, 2022

The change is rquired to build ROS2 as a static set of librarys using the standart cmake feature BUILD_SHARED_LIBS=off
With this change I can link rmw_dds_common as a static lib and run ros2 applications without a ROS2 installation.

s. ros2/ros2#468

@methylDragon
Copy link
Contributor

Got it! There's some internal discussion about this, and we can change it, though it'll necessitate some changes in upstream ROS libraries, so it might take a little while to resolve.

@methylDragon
Copy link
Contributor

methylDragon commented Jun 9, 2022

Hi there! With the merge of ament/ament_cmake#390 , we can now merge this, with one change.

Could you help to add this line here, please? Once you do I'll launch CI and work towards getting this merged!

find_package(ament_cmake REQUIRED)
find_package(rcpputils REQUIRED)
find_package(rcutils REQUIRED)
find_package(rmw REQUIRED)
find_package(rosidl_default_generators REQUIRED)

ament_add_default_options() <<<--- THIS ONE! ⭐
ament_export_dependencies(ament_cmake_core)
ament_export_dependencies(rcpputils)
ament_export_dependencies(rcutils)
ament_export_dependencies(rmw)

@methylDragon methylDragon self-requested a review June 9, 2022 21:47
Copy link
Contributor

@methylDragon methylDragon left a comment

Choose a reason for hiding this comment

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

See above post

@audrow audrow changed the base branch from master to rolling June 28, 2022 14:22
@methylDragon
Copy link
Contributor

Bumping @hannes09

…mmon options

Signed-off-by: Hannes Harms <h.harms@grimme.de>
@hannes09
Copy link
Contributor Author

I have added ament_add_default_options, but now the build fails.

@clalancette
Copy link
Contributor

We need to do a release of ament_cmake. I'll get to that a little later today.

@clalancette
Copy link
Contributor

@ros-pull-request-builder retest this please

@methylDragon methylDragon merged commit b05b7e0 into ros2:rolling Jul 12, 2022
@methylDragon
Copy link
Contributor

methylDragon commented Jul 12, 2022

I forgot ci.. my bad

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

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.

3 participants