aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/lib/CMakeLists.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt
index 309a5bf72..00da8b75c 100644
--- a/host/lib/CMakeLists.txt
+++ b/host/lib/CMakeLists.txt
@@ -181,6 +181,10 @@ if(ENABLE_MPMD)
endif()
add_library(uhd SHARED ${libuhd_sources})
target_link_libraries(uhd ${Boost_LIBRARIES} ${libuhd_libs})
+if(APPLE)
+ target_link_options(uhd PRIVATE "LINKER:-undefined,dynamic_lookup")
+ target_link_options(uhd PRIVATE "-flat_namespace")
+endif(APPLE)
set_target_properties(uhd PROPERTIES DEFINE_SYMBOL "UHD_DLL_EXPORTS")
if(NOT LIBUHDDEV_PKG)
set_target_properties(uhd PROPERTIES SOVERSION "${UHD_ABI_VERSION}")
@@ -205,9 +209,6 @@ if(ENABLE_SIM)
# python instead of being called by it, we have to.
target_link_libraries(uhd ${PYTHON_LIBRARIES})
- if(APPLE)
- target_link_options(uhd PRIVATE "LINKER:-undefined,dynamic_lookup")
- endif(APPLE)
endif(ENABLE_SIM)
if(NOT UHDHOST_PKG) #Syntax makes it unusable by UHD_INSTALL