Skip to content

[#23543] Set CMAKE_SHARED_LIBRARY_SUFFIX to always create .so files. (backport #207)#259

Merged
emiliocuestaf merged 3 commits into1.4.xfrom
mergify/bp/1.4.x/pr-207
Mar 2, 2026
Merged

[#23543] Set CMAKE_SHARED_LIBRARY_SUFFIX to always create .so files. (backport #207)#259
emiliocuestaf merged 3 commits into1.4.xfrom
mergify/bp/1.4.x/pr-207

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)

# Conflicts:
#	fastdds_python/test/types/test_complete.i
#	fastdds_python/test/types/test_modules.i
#	fastdds_python_examples/RPCExample/generated_code/CMakeLists.txt
@mergify
Copy link
Author

mergify bot commented Sep 25, 2025

Cherry-pick of 57a5541 has failed:

On branch mergify/bp/1.4.x/pr-207
Your branch is up to date with 'origin/1.4.x'.

You are currently cherry-picking commit 57a5541.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   fastdds_python/CMakeLists.txt
	modified:   fastdds_python/test/types/CMakeLists.txt
	modified:   fastdds_python_examples/HelloWorldExample/CMakeLists.txt

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   fastdds_python/test/types/test_complete.i
	both modified:   fastdds_python/test/types/test_modules.i
	deleted by us:   fastdds_python_examples/RPCExample/generated_code/CMakeLists.txt

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>
@emiliocuestaf emiliocuestaf requested review from richiprosima and removed request for richiprosima March 2, 2026 09:52
@emiliocuestaf emiliocuestaf requested review from richiprosima and removed request for richiprosima March 2, 2026 09:53
@github-actions github-actions bot added the ci-pending PR which CI is running label Mar 2, 2026
@emiliocuestaf emiliocuestaf added ready-to-merge Ready to be merged. CI and changes have been reviewed and approved. and removed ci-pending PR which CI is running labels Mar 2, 2026
emiliocuestaf
emiliocuestaf previously approved these changes Mar 2, 2026
Copy link
Contributor

@emiliocuestaf emiliocuestaf left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Emilio Cuesta Fernandez <emiliocuesta@eprosima.com>
@github-actions github-actions bot added the ci-pending PR which CI is running label Mar 2, 2026
@emiliocuestaf emiliocuestaf removed the request for review from richiprosima March 2, 2026 10:50
@emiliocuestaf emiliocuestaf merged commit 38ec51d into 1.4.x Mar 2, 2026
8 checks passed
@emiliocuestaf emiliocuestaf deleted the mergify/bp/1.4.x/pr-207 branch March 2, 2026 11:42
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 ready-to-merge Ready to be merged. CI and changes have been reviewed and approved.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants