diff options
author | Steven Koo <steven.koo@ni.com> | 2022-01-10 14:39:35 -0600 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-01-19 14:28:32 -0600 |
commit | 2c7ce2dbf72414b64f8a477be614e23bc12f086d (patch) | |
tree | 84d26e2e1a6e120322b85304679ead6a54c03cb9 /host | |
parent | 2084d781ede89f60c75030f092fe89ce66f8767c (diff) | |
download | uhd-2c7ce2dbf72414b64f8a477be614e23bc12f086d.tar.gz uhd-2c7ce2dbf72414b64f8a477be614e23bc12f086d.tar.bz2 uhd-2c7ce2dbf72414b64f8a477be614e23bc12f086d.zip |
lib: set dynamic_lookup and flat_namespace
This resolves some linking issues across binaries.
Signed-off-by: Steven Koo <steven.koo@ni.com>
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/CMakeLists.txt | 7 |
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 |