Skip to content

Commit 743eeba

Browse files
committed
CMake (macOS): force dlopen searching for /usr/local/lib
1 parent 609caad commit 743eeba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,8 +724,8 @@ if(yyjson_FOUND)
724724
else()
725725
# Used for dlopen finding dylibs installed by homebrew
726726
# `/opt/homebrew/lib` is not on in dlopen search path by default
727-
if(APPLE AND DEFINED ENV{HOMEBREW_PREFIX})
728-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,$ENV{HOMEBREW_PREFIX}/lib")
727+
if(APPLE)
728+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,/opt/homebrew/lib -Wl,-rpath,/usr/local/lib")
729729
endif()
730730
endif()
731731

0 commit comments

Comments
 (0)