Skip to content

Conversation

@mergify
Copy link

@mergify mergify bot commented Sep 25, 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 backport 2.3.x 2.2.x 1.4.x

Fixes #206

Contributor Checklist

  • Commit messages follow the project guidelines.
  • N/A: 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.

This is an automatic backport of pull request #207 done by [Mergify](https://mergify.com).

* Set CMAKE_SHARED_LIBRARY_SUFFIX to always create .so files.

* [#23543] Added cmake option and default suffix for platforms

Signed-off-by: danipiza <dpizarrogallego@gmail.com>

* [#23543] Added cmake option for Python test and examples

Signed-off-by: danipiza <dpizarrogallego@gmail.com>

* [#23543] Default value for Windows OS

Signed-off-by: danipiza <dpizarrogallego@gmail.com>

* [#23543] Review changes

Signed-off-by: danipiza <dpizarrogallego@gmail.com>

* Refs #23543. Regenerate code with Fast DDS Gen from related PR.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

---------

Signed-off-by: danipiza <dpizarrogallego@gmail.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Co-authored-by: Keane Wong <kwong@FELT241.FluxErgy.local>
Co-authored-by: danipiza <dpizarrogallego@gmail.com>
Co-authored-by: Miguel Company <MiguelCompany@eprosima.com>
(cherry picked from commit 57a5541)
@MiguelCompany MiguelCompany added this to the v2.3.1 milestone Sep 25, 2025
@MiguelCompany MiguelCompany self-requested a review September 25, 2025 08:52
@github-actions github-actions bot added the ci-pending PR which CI is running label Sep 25, 2025
@MiguelCompany MiguelCompany merged commit e7414b4 into 2.3.x Sep 25, 2025
8 checks passed
@MiguelCompany MiguelCompany deleted the mergify/bp/2.3.x/pr-207 branch September 25, 2025 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-pending PR which CI is running

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants