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

Set CMAKE_SHARED_LIBRARY_SUFFIX to always create .so files. #207

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KeaneWong
Copy link

@KeaneWong KeaneWong commented Feb 20, 2025

Description

Currently, the way that CMake creates the library files always generates .dylib files on Mac. Compilation will work fine, but attempting to import in any Python app will cause the import to fail, as the interpreter expects .so files for library files.
For some reason, using the flag
--cmake-args " -DCMAKE_SHARED_LIBRARY_SUFFIX=.so"
does not fix the issue. Additionally, setting the variable before the project() line in the CMakeLists also remains inneffective. So, the workaround is to add
set(CMAKE_SHARED_LIBRARY_SUFFIX .so)
right after the project() line.

@Mergifyio backports 2.1.x

Fixes #206

Contributor Checklist

  • Commit messages follow the project guidelines.
  • Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • Changes are API compatible.
  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

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.

FastDDS Python generates .dylib files instead of .so files on MacOS
1 participant