From 10cf104ffc1d0ce3562904bcaf2a641518acb180 Mon Sep 17 00:00:00 2001 From: Michael Dickens Date: Tue, 19 Feb 2019 10:31:35 -0500 Subject: cmake: remove Boost from dyn libs for tests on Apple Remove "${prefix}/lib" from the DYLD path for APPLE only. Apple's DYLD uses the paths embedded in the binary file (library or executable) as a secondary means for finding referenced libraries. Explicitly including "${prefix}/lib" can result in libraries being found and used by System frameworks that are not compatible with them. Moving to just using build paths fixes this issue. --- host/cmake/Modules/UHDUnitTest.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'host') diff --git a/host/cmake/Modules/UHDUnitTest.cmake b/host/cmake/Modules/UHDUnitTest.cmake index 7937db4d3..0807fe3b5 100644 --- a/host/cmake/Modules/UHDUnitTest.cmake +++ b/host/cmake/Modules/UHDUnitTest.cmake @@ -27,8 +27,10 @@ function(UHD_ADD_TEST test_name) set(UHD_TEST_LIBRARY_DIRS "${CMAKE_BINARY_DIR}/lib" "${CMAKE_CURRENT_BINARY_DIR}" - "${Boost_LIBRARY_DIRS}" ) + if(NOT APPLE) + list(APPEND UHD_TEST_LIBRARY_DIRS "${Boost_LIBRARY_DIRS}") + endif(NOT APPLE) endif(WIN32) file(TO_NATIVE_PATH "${UHD_TEST_LIBRARY_DIRS}" libpath) -- cgit v1.2.3