Fast-DDS-python icon indicating copy to clipboard operation
Fast-DDS-python copied to clipboard

Set CMAKE_SHARED_LIBRARY_SUFFIX to always create .so files.

Open KeaneWong opened this issue 10 months ago • 0 comments

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.
  • [X] 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.

KeaneWong avatar Feb 20 '25 19:02 KeaneWong