diff options
author | Andoni Morales Alastruey <ylatuya@gmail.com> | 2018-12-21 13:38:18 +0100 |
---|---|---|
committer | Andoni Morales Alastruey <ylatuya@gmail.com> | 2019-01-04 18:26:21 +0000 |
commit | 45ef7e02e0f06a99981e1564e0cddc1a3691e61c (patch) | |
tree | a1173ea78c45aea3f74400b43ef35e4c40941c43 | |
parent | 885d98a9925f13c66a995fa01f6ef7782a0a2692 (diff) |
srt: fix install_name in macOS
see: https://github.com/Haivision/srt/pull/524
Fixes #63
-rw-r--r-- | recipes/srt.recipe | 4 | ||||
-rw-r--r-- | recipes/srt/0006-Fix-install_name-in-macOS-using-MACOS_RPATH.patch | 38 |
2 files changed, 41 insertions, 1 deletions
diff --git a/recipes/srt.recipe b/recipes/srt.recipe index 3227bd17..c20344fb 100644 --- a/recipes/srt.recipe +++ b/recipes/srt.recipe @@ -20,7 +20,9 @@ class Recipe(recipe.Recipe): 'srt/0003-platform_sys-Only-include-inttypes.h-with-MSFT-compi.patch', 'srt/0004-MingW-needs-the-explicit-exports-too.patch', 'srt/0005-Windows-Only-define-SRT_API-in-one-place.patch', - 'srt/0001-Allow-building-using-gnustl.patch'] + 'srt/0001-Allow-building-using-gnustl.patch', + 'srt/0006-Fix-install_name-in-macOS-using-MACOS_RPATH.patch', + ] def prepare(self): if self.config.target_platform == Platform.ANDROID: diff --git a/recipes/srt/0006-Fix-install_name-in-macOS-using-MACOS_RPATH.patch b/recipes/srt/0006-Fix-install_name-in-macOS-using-MACOS_RPATH.patch new file mode 100644 index 00000000..84518eb8 --- /dev/null +++ b/recipes/srt/0006-Fix-install_name-in-macOS-using-MACOS_RPATH.patch @@ -0,0 +1,38 @@ +From c92a30054a4db6cdeaa7f1fb9e4bc5718c177a75 Mon Sep 17 00:00:00 2001 +From: Andoni Morales Alastruey <ylatuya@gmail.com> +Date: Fri, 4 Jan 2019 11:51:26 +0100 +Subject: [PATCH] Fix install_name in macOS using MACOS_RPATH + +Instead of librst.1.dylib use @rpath/libsrt.1.dylib +This is also the recommended setting as per CMP0042 policy +--- + CMakeLists.txt | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c31576b..2acfa41 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -287,9 +287,8 @@ if(WIN32) + message(STATUS "DETECTED SYSTEM: WINDOWS; WIN32=1; PTW32_STATIC_LIB=1") + add_definitions(-DWIN32=1 -DPTW32_STATIC_LIB) + elseif(DARWIN) +- message(STATUS "DETECTED SYSTEM: DARWIN; OSX=11; MACOSX_RPATH=OFF") ++ message(STATUS "DETECTED SYSTEM: DARWIN; OSX=11") + add_definitions(-DOSX=1) +- set(MACOSX_RPATH OFF) + elseif(LINUX) + add_definitions(-DLINUX=1) + message(STATUS "DETECTED SYSTEM: LINUX; LINUX=1" ) +@@ -470,6 +469,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() + +-- +2.14.1 + |