Skip to content

Commit

Permalink
Fix install_name in macOS using MACOS_RPATH
Browse files Browse the repository at this point in the history
Instead of librst.1.dylib use @rpath/libsrt.1.dylib
This is also the recommended setting as per CMP0042 policy
  • Loading branch information
ylatuya authored and rndi committed Jan 4, 2019
1 parent 7185a6a commit 2ef4ef0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,8 @@ if(WIN32)
message(STATUS "DETECTED SYSTEM: WINDOWS; WIN32=1; PTW32_STATIC_LIB=1")
add_definitions(-DWIN32=1 -DPTW32_STATIC_LIB=1)
elseif(DARWIN)
message(STATUS "DETECTED SYSTEM: DARWIN; OSX=1; MACOSX_RPATH=OFF")
message(STATUS "DETECTED SYSTEM: DARWIN; OSX=1")
add_definitions(-DOSX=1)
set(MACOSX_RPATH OFF)
elseif(LINUX)
add_definitions(-DLINUX=1)
message(STATUS "DETECTED SYSTEM: LINUX; LINUX=1" )
Expand Down Expand Up @@ -482,6 +481,8 @@ if (srt_libspec_shared)
target_link_libraries(${TARGET_srt}_shared PRIVATE ws2_32.lib)
elseif (MINGW)
target_link_libraries(${TARGET_srt}_shared PRIVATE wsock32.lib ws2_32.lib)
elseif (APPLE)
set_property(TARGET ${TARGET_srt}_shared PROPERTY MACOSX_RPATH ON)
endif()
endif()

Expand Down

0 comments on commit 2ef4ef0

Please sign in to comment.