Skip to content

Commit a4845fa

Browse files
authored
set MACOSX_RPATH to true on Apple
1 parent 19f8a8d commit a4845fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,10 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "AIX|Android|Linux|FreeBSD|OpenBSD|NetBSD|Drago
256256
endif()
257257
endif()
258258

259+
if (APPLE AND BUILD_SHARED_LIBS)
260+
set(CMAKE_MACOSX_RPATH ON)
261+
endif()
262+
259263
# Seems that this hack doesn't required since macOS 11 Big Sur
260264
if (APPLE AND BUILD_SHARED_LIBS AND CMAKE_HOST_SYSTEM_VERSION VERSION_LESS 20)
261265
set (CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)

0 commit comments

Comments
 (0)