Commit 0b819e96 authored by Nicolas Docquier's avatar Nicolas Docquier
Browse files

Merge branch 'Macos_lib_extension' into 'Release_1.9.4'

Macos lib extension -> force .so

CMakeLists.txt files of userfct and symbolic are modified to force the extension of the lib to be `.so` rather than `.dylib` when compiling with FLAG_SEPARATE_BUILD to ON. This is done for MacOS only.

This avoids to modify the function that load the dynamic library at runtime.

See merge request !90
parents 67072872 d0b61de9
...@@ -50,6 +50,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} ) ...@@ -50,6 +50,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC ) if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC )
add_library(Project_symbolic SHARED ${SOURCE_FILES}) add_library(Project_symbolic SHARED ${SOURCE_FILES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_symbolic PROPERTIES SUFFIX .so)
endif()
else() else()
add_library(Project_symbolic STATIC ${SOURCE_FILES}) add_library(Project_symbolic STATIC ${SOURCE_FILES})
add_definitions( -DPROJECT_USERFCT_STATIC_DEFINE) add_definitions( -DPROJECT_USERFCT_STATIC_DEFINE)
......
...@@ -83,6 +83,12 @@ if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT ) ...@@ -83,6 +83,12 @@ if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT )
target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME}) target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME})
target_link_libraries (Project_userfct ${LIB_MBSYSC_MODULES}) target_link_libraries (Project_userfct ${LIB_MBSYSC_MODULES})
target_link_libraries (Project_userfct ${LIB_MBSYSC_UTILITIES}) target_link_libraries (Project_userfct ${LIB_MBSYSC_UTILITIES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_userfct PROPERTIES SUFFIX ".so")
endif()
else() else()
add_library(Project_userfct STATIC ${SOURCE_FILES}) add_library(Project_userfct STATIC ${SOURCE_FILES})
add_definitions( -DMBSYSC_UTILITIES_STATIC_DEFINE) add_definitions( -DMBSYSC_UTILITIES_STATIC_DEFINE)
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include "user_IO.h" #include "user_IO.h"
UserIO* mbs_new_user_IO() UserIO* mbs_new_user_IO(UserIoInfo* ioInfo)
{ {
UserIO *uvs; UserIO *uvs;
int i=0; int i=0;
......
...@@ -50,6 +50,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} ) ...@@ -50,6 +50,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC ) if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC )
add_library(Project_symbolic SHARED ${SOURCE_FILES}) add_library(Project_symbolic SHARED ${SOURCE_FILES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_symbolic PROPERTIES SUFFIX .so)
endif()
else() else()
add_library(Project_symbolic STATIC ${SOURCE_FILES}) add_library(Project_symbolic STATIC ${SOURCE_FILES})
add_definitions( -DPROJECT_USERFCT_STATIC_DEFINE) add_definitions( -DPROJECT_USERFCT_STATIC_DEFINE)
......
...@@ -83,6 +83,12 @@ if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT ) ...@@ -83,6 +83,12 @@ if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT )
target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME}) target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME})
target_link_libraries (Project_userfct ${LIB_MBSYSC_MODULES}) target_link_libraries (Project_userfct ${LIB_MBSYSC_MODULES})
target_link_libraries (Project_userfct ${LIB_MBSYSC_UTILITIES}) target_link_libraries (Project_userfct ${LIB_MBSYSC_UTILITIES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_userfct PROPERTIES SUFFIX ".so")
endif()
else() else()
add_library(Project_userfct STATIC ${SOURCE_FILES}) add_library(Project_userfct STATIC ${SOURCE_FILES})
add_definitions( -DMBSYSC_UTILITIES_STATIC_DEFINE) add_definitions( -DMBSYSC_UTILITIES_STATIC_DEFINE)
......
...@@ -56,6 +56,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} ) ...@@ -56,6 +56,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC ) if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC )
add_library(Project_symbolic SHARED ${SOURCE_FILES}) add_library(Project_symbolic SHARED ${SOURCE_FILES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_symbolic PROPERTIES SUFFIX .so)
endif()
else() else()
add_library(Project_symbolic STATIC ${SOURCE_FILES}) add_library(Project_symbolic STATIC ${SOURCE_FILES})
add_definitions( -DPROJECT_SYMBOLIC_STATIC_DEFINE) add_definitions( -DPROJECT_SYMBOLIC_STATIC_DEFINE)
......
...@@ -89,6 +89,12 @@ if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT ) ...@@ -89,6 +89,12 @@ if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT )
target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME}) target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME})
target_link_libraries (Project_userfct ${LIB_MBSYSC_MODULES}) target_link_libraries (Project_userfct ${LIB_MBSYSC_MODULES})
target_link_libraries (Project_userfct ${LIB_MBSYSC_UTILITIES}) target_link_libraries (Project_userfct ${LIB_MBSYSC_UTILITIES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_userfct PROPERTIES SUFFIX ".so")
endif()
else() else()
add_library(Project_userfct STATIC ${SOURCE_FILES}) add_library(Project_userfct STATIC ${SOURCE_FILES})
add_definitions( -DMBSYSC_UTILITIES_STATIC_DEFINE) add_definitions( -DMBSYSC_UTILITIES_STATIC_DEFINE)
......
...@@ -56,6 +56,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} ) ...@@ -56,6 +56,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC ) if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC )
add_library(Project_symbolic SHARED ${SOURCE_FILES}) add_library(Project_symbolic SHARED ${SOURCE_FILES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_symbolic PROPERTIES SUFFIX .so)
endif()
else() else()
add_library(Project_symbolic STATIC ${SOURCE_FILES}) add_library(Project_symbolic STATIC ${SOURCE_FILES})
add_definitions( -DPROJECT_SYMBOLIC_STATIC_DEFINE) add_definitions( -DPROJECT_SYMBOLIC_STATIC_DEFINE)
......
...@@ -89,6 +89,12 @@ if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT ) ...@@ -89,6 +89,12 @@ if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT )
target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME}) target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME})
target_link_libraries (Project_userfct ${LIB_MBSYSC_MODULES}) target_link_libraries (Project_userfct ${LIB_MBSYSC_MODULES})
target_link_libraries (Project_userfct ${LIB_MBSYSC_UTILITIES}) target_link_libraries (Project_userfct ${LIB_MBSYSC_UTILITIES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_userfct PROPERTIES SUFFIX ".so")
endif()
else() else()
add_library(Project_userfct STATIC ${SOURCE_FILES}) add_library(Project_userfct STATIC ${SOURCE_FILES})
add_definitions( -DMBSYSC_UTILITIES_STATIC_DEFINE) add_definitions( -DMBSYSC_UTILITIES_STATIC_DEFINE)
......
...@@ -56,6 +56,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} ) ...@@ -56,6 +56,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC ) if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC )
add_library(Project_symbolic SHARED ${SOURCE_FILES}) add_library(Project_symbolic SHARED ${SOURCE_FILES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_symbolic PROPERTIES SUFFIX .so)
endif()
else() else()
add_library(Project_symbolic STATIC ${SOURCE_FILES}) add_library(Project_symbolic STATIC ${SOURCE_FILES})
add_definitions( -DPROJECT_SYMBOLIC_STATIC_DEFINE) add_definitions( -DPROJECT_SYMBOLIC_STATIC_DEFINE)
......
...@@ -89,6 +89,12 @@ if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT ) ...@@ -89,6 +89,12 @@ if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT )
target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME}) target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME})
target_link_libraries (Project_userfct ${LIB_MBSYSC_MODULES}) target_link_libraries (Project_userfct ${LIB_MBSYSC_MODULES})
target_link_libraries (Project_userfct ${LIB_MBSYSC_UTILITIES}) target_link_libraries (Project_userfct ${LIB_MBSYSC_UTILITIES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_userfct PROPERTIES SUFFIX ".so")
endif()
else() else()
add_library(Project_userfct STATIC ${SOURCE_FILES}) add_library(Project_userfct STATIC ${SOURCE_FILES})
add_definitions( -DMBSYSC_UTILITIES_STATIC_DEFINE) add_definitions( -DMBSYSC_UTILITIES_STATIC_DEFINE)
......
...@@ -56,6 +56,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} ) ...@@ -56,6 +56,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC ) if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC )
add_library(Project_symbolic SHARED ${SOURCE_FILES}) add_library(Project_symbolic SHARED ${SOURCE_FILES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_symbolic PROPERTIES SUFFIX .so)
endif()
else() else()
add_library(Project_symbolic STATIC ${SOURCE_FILES}) add_library(Project_symbolic STATIC ${SOURCE_FILES})
add_definitions( -DPROJECT_SYMBOLIC_STATIC_DEFINE) add_definitions( -DPROJECT_SYMBOLIC_STATIC_DEFINE)
......
...@@ -89,6 +89,12 @@ if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT ) ...@@ -89,6 +89,12 @@ if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT )
target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME}) target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME})
target_link_libraries (Project_userfct ${LIB_MBSYSC_MODULES}) target_link_libraries (Project_userfct ${LIB_MBSYSC_MODULES})
target_link_libraries (Project_userfct ${LIB_MBSYSC_UTILITIES}) target_link_libraries (Project_userfct ${LIB_MBSYSC_UTILITIES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_userfct PROPERTIES SUFFIX ".so")
endif()
else() else()
add_library(Project_userfct STATIC ${SOURCE_FILES}) add_library(Project_userfct STATIC ${SOURCE_FILES})
add_definitions( -DMBSYSC_UTILITIES_STATIC_DEFINE) add_definitions( -DMBSYSC_UTILITIES_STATIC_DEFINE)
......
...@@ -56,6 +56,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} ) ...@@ -56,6 +56,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC ) if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC )
add_library(Project_symbolic SHARED ${SOURCE_FILES}) add_library(Project_symbolic SHARED ${SOURCE_FILES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_symbolic PROPERTIES SUFFIX .so)
endif()
else() else()
add_library(Project_symbolic STATIC ${SOURCE_FILES}) add_library(Project_symbolic STATIC ${SOURCE_FILES})
add_definitions( -DPROJECT_SYMBOLIC_STATIC_DEFINE) add_definitions( -DPROJECT_SYMBOLIC_STATIC_DEFINE)
......
...@@ -89,6 +89,12 @@ if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT ) ...@@ -89,6 +89,12 @@ if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT )
target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME}) target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME})
target_link_libraries (Project_userfct ${LIB_MBSYSC_MODULES}) target_link_libraries (Project_userfct ${LIB_MBSYSC_MODULES})
target_link_libraries (Project_userfct ${LIB_MBSYSC_UTILITIES}) target_link_libraries (Project_userfct ${LIB_MBSYSC_UTILITIES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_userfct PROPERTIES SUFFIX ".so")
endif()
else() else()
add_library(Project_userfct STATIC ${SOURCE_FILES}) add_library(Project_userfct STATIC ${SOURCE_FILES})
add_definitions( -DMBSYSC_UTILITIES_STATIC_DEFINE) add_definitions( -DMBSYSC_UTILITIES_STATIC_DEFINE)
......
...@@ -56,6 +56,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} ) ...@@ -56,6 +56,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC ) if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC )
add_library(Project_symbolic SHARED ${SOURCE_FILES}) add_library(Project_symbolic SHARED ${SOURCE_FILES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_symbolic PROPERTIES SUFFIX .so)
endif()
else() else()
add_library(Project_symbolic STATIC ${SOURCE_FILES}) add_library(Project_symbolic STATIC ${SOURCE_FILES})
add_definitions( -DPROJECT_SYMBOLIC_STATIC_DEFINE) add_definitions( -DPROJECT_SYMBOLIC_STATIC_DEFINE)
......
...@@ -89,6 +89,12 @@ if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT ) ...@@ -89,6 +89,12 @@ if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT )
target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME}) target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME})
target_link_libraries (Project_userfct ${LIB_MBSYSC_MODULES}) target_link_libraries (Project_userfct ${LIB_MBSYSC_MODULES})
target_link_libraries (Project_userfct ${LIB_MBSYSC_UTILITIES}) target_link_libraries (Project_userfct ${LIB_MBSYSC_UTILITIES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_userfct PROPERTIES SUFFIX ".so")
endif()
else() else()
add_library(Project_userfct STATIC ${SOURCE_FILES}) add_library(Project_userfct STATIC ${SOURCE_FILES})
add_definitions( -DMBSYSC_UTILITIES_STATIC_DEFINE) add_definitions( -DMBSYSC_UTILITIES_STATIC_DEFINE)
......
...@@ -56,6 +56,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} ) ...@@ -56,6 +56,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC ) if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC )
add_library(Project_symbolic SHARED ${SOURCE_FILES}) add_library(Project_symbolic SHARED ${SOURCE_FILES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_symbolic PROPERTIES SUFFIX .so)
endif()
else() else()
add_library(Project_symbolic STATIC ${SOURCE_FILES}) add_library(Project_symbolic STATIC ${SOURCE_FILES})
add_definitions( -DPROJECT_SYMBOLIC_STATIC_DEFINE) add_definitions( -DPROJECT_SYMBOLIC_STATIC_DEFINE)
......
...@@ -89,6 +89,12 @@ if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT ) ...@@ -89,6 +89,12 @@ if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT )
target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME}) target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME})
target_link_libraries (Project_userfct ${LIB_MBSYSC_MODULES}) target_link_libraries (Project_userfct ${LIB_MBSYSC_MODULES})
target_link_libraries (Project_userfct ${LIB_MBSYSC_UTILITIES}) target_link_libraries (Project_userfct ${LIB_MBSYSC_UTILITIES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_userfct PROPERTIES SUFFIX ".so")
endif()
else() else()
add_library(Project_userfct STATIC ${SOURCE_FILES}) add_library(Project_userfct STATIC ${SOURCE_FILES})
add_definitions( -DMBSYSC_UTILITIES_STATIC_DEFINE) add_definitions( -DMBSYSC_UTILITIES_STATIC_DEFINE)
......
...@@ -56,6 +56,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} ) ...@@ -56,6 +56,11 @@ include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC ) if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC )
add_library(Project_symbolic SHARED ${SOURCE_FILES}) add_library(Project_symbolic SHARED ${SOURCE_FILES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_symbolic PROPERTIES SUFFIX .so)
endif()
else() else()
add_library(Project_symbolic STATIC ${SOURCE_FILES}) add_library(Project_symbolic STATIC ${SOURCE_FILES})
add_definitions( -DPROJECT_SYMBOLIC_STATIC_DEFINE) add_definitions( -DPROJECT_SYMBOLIC_STATIC_DEFINE)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment