Skip to content

Commit 496811e

Browse files
Set CMAKE_SHARED_LIBRARY_SUFFIX to always create .so files (#504)
* [#23543] Set CMAKE_SHARED_LIBRARY_SUFFIX to always create .so files. Signed-off-by: danipiza <[email protected]> * Refs #23543. Apply suggestion Signed-off-by: Miguel Company <[email protected]> --------- Signed-off-by: danipiza <[email protected]> Signed-off-by: Miguel Company <[email protected]> Co-authored-by: Miguel Company <[email protected]>
1 parent 72b9379 commit 496811e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/com/eprosima/fastdds/idl/templates/SwigCMake.stg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ find_package(fastdds 3 REQUIRED)
6363

6464
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
6565

66+
if(NOT WIN32)
67+
# Default values for shared library suffix in MacOS
68+
if(\${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
69+
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
70+
endif()
71+
endif()
72+
6673
#Create library for C++ types
6774
add_library(\${PROJECT_NAME} SHARED
6875
$project.commonSrcFiles_escaped; separator="\n"$

0 commit comments

Comments
 (0)