Skip to content

Commit

Permalink
Merge pull request #4840 from martin-frbg/issue4823
Browse files Browse the repository at this point in the history
set MACOSX_RPATH to true on Apple
  • Loading branch information
martin-frbg authored Aug 5, 2024
2 parents 19f8a8d + a4845fa commit 14a8a9a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "AIX|Android|Linux|FreeBSD|OpenBSD|NetBSD|Drago
endif()
endif()

if (APPLE AND BUILD_SHARED_LIBS)
set(CMAKE_MACOSX_RPATH ON)
endif()

# Seems that this hack doesn't required since macOS 11 Big Sur
if (APPLE AND BUILD_SHARED_LIBS AND CMAKE_HOST_SYSTEM_VERSION VERSION_LESS 20)
set (CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
Expand Down

0 comments on commit 14a8a9a

Please sign in to comment.