Browse Source

CI: Add rpath info to _obspython

Colin Edwards 7 years ago
parent
commit
285d9bd6f1
2 changed files with 13 additions and 0 deletions
  1. 2 0
      CI/install/osx/build_app.py
  2. 11 0
      deps/obs-scripting/obspython/CMakeLists.txt

+ 2 - 0
CI/install/osx/build_app.py

@@ -197,6 +197,8 @@ for path, external, copy_as in inspected:
 	filename = path
 	rpath = ""
 	if external:
+		if copy_as == "Python":
+			continue
 		id_ = "-id '@rpath/%s'"%copy_as
 		filename = prefix + "bin/" +copy_as
 		rpath = "-add_rpath @loader_path/ -add_rpath @executable_path/"

+ 11 - 0
deps/obs-scripting/obspython/CMakeLists.txt

@@ -45,6 +45,17 @@ function(install_plugin_bin_swig target additional_target)
 	set_target_properties(${additional_target} PROPERTIES
 		PREFIX "")
 
+	if (APPLE)
+		set_property(
+				TARGET ${additional_target}
+				APPEND
+				PROPERTY INSTALL_RPATH
+				"/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/"
+				"/Library/Frameworks/Python.framework/Versions/3.6/lib/"
+				"/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/"
+		)
+	endif()
+
 	install(FILES "${CMAKE_CURRENT_BINARY_DIR}/obspython.py"
 		DESTINATION "${OBS_SCRIPT_PLUGIN_DESTINATION}")
 	install(TARGETS "${additional_target}"