From 2c7ce2dbf72414b64f8a477be614e23bc12f086d Mon Sep 17 00:00:00 2001 From: Steven Koo Date: Mon, 10 Jan 2022 14:39:35 -0600 Subject: lib: set dynamic_lookup and flat_namespace This resolves some linking issues across binaries. Signed-off-by: Steven Koo --- host/lib/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'host') 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 -- cgit v1.2.3