Skip to content

Commit e32d946

Browse files
DanipizaMiguelCompany
authored andcommitted
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 <dpizarrogallego@gmail.com> * Refs #23543. Apply suggestion 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: Miguel Company <miguelcompany@eprosima.com> (cherry picked from commit 496811e)
1 parent 8b85fa1 commit e32d946

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
@@ -49,6 +49,13 @@ find_package(fastdds 3 REQUIRED)
4949

5050
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
5151

52+
if(NOT WIN32)
53+
# Default values for shared library suffix in MacOS
54+
if(\${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
55+
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
56+
endif()
57+
endif()
58+
5259
#Create library for C++ types
5360
add_library(\${PROJECT_NAME} SHARED
5461
$project.commonSrcFiles_escaped; separator="\n"$

0 commit comments

Comments
 (0)