Browse Source

CI: Add extra rpath for macOS test binaries

Colin Edwards 3 years ago
parent
commit
61ca8d47aa
1 changed files with 4 additions and 0 deletions
  1. 4 0
      test/cmocka/CMakeLists.txt

+ 4 - 0
test/cmocka/CMakeLists.txt

@@ -7,6 +7,10 @@ macro(fixLink target_arg)
 			POST_BUILD COMMAND "${CMAKE_INSTALL_NAME_TOOL}"
 			POST_BUILD COMMAND "${CMAKE_INSTALL_NAME_TOOL}"
 			"-change" "@rpath/libobs.0.dylib" "@executable_path/../../libobs/libobs.0.dylib"
 			"-change" "@rpath/libobs.0.dylib" "@executable_path/../../libobs/libobs.0.dylib"
 			"$<TARGET_FILE:${target_arg}>" VERBATIM)
 			"$<TARGET_FILE:${target_arg}>" VERBATIM)
+		add_custom_command (TARGET ${target_arg}
+			POST_BUILD COMMAND "${CMAKE_INSTALL_NAME_TOOL}"
+			"-add_rpath" /tmp/obsdeps/lib
+			"$<TARGET_FILE:${target_arg}>" VERBATIM)
 	endif()
 	endif()
 endmacro()
 endmacro()