Skip to content

Conversation

traversaro
Copy link
Contributor

CMake provides the CMAKE_DL_LIBS variable that contain the library that contains dlopen and dlclose.

Using it, it is possible to avoid to hardcode any platform specific logic, for existing platform and for future platforms, that will just need to set the CMAKE_DL_LIBS in their CMake platform file.

@traversaro
Copy link
Contributor Author

In ROS2 the CMAKE_DL_LIBS variable is already used in https://github.com/ros2/rcutils/blob/5.0.1/CMakeLists.txt#L133 .

@wjwwood wjwwood merged commit 5b1109b into osrf:master Feb 14, 2022
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