Adds required linker options for the depenedency managet on OSX systems
@@ -21,14 +21,22 @@ target_include_directories(dependency_manager_static PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/api>
$<INSTALL_INTERFACE:include/celix/dependency_manager>
)
-target_link_libraries(dependency_manager_static PUBLIC Celix::framework)
+if (APPLE)
+ target_link_libraries(dependency_manager_static Celix::framework "-undefined dynamic_lookup")
+else()
+ target_link_libraries(dependency_manager_static Celix::framework)
+endif()
add_library(dependency_manager_so SHARED src/dm_activator.c)
target_include_directories(dependency_manager_so PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/api>
$<INSTALL_INTERFACE:include/celix/dependency_manager>
)
-target_link_libraries(dependency_manager_so PUBLIC Celix::framework)
+if (APPLE)
+ target_link_libraries(dependency_manager_so Celix::framework "-undefined dynamic_lookup")
+else()
+ target_link_libraries(dependency_manager_so Celix::framework)
+endif()
#now part of the the shell bundle
add_library(dm_shell INTERFACE)
