Fix macos share library linking
@@ -24,3 +24,10 @@ echo "****************************"
cd interfaces/cython
$PYTHON setup.py build --build-lib=../../build/python install
+
+if [[ "$target_platform" == osx-* ]]; then
+ VERSION=$(echo $PKG_VERSION | cut -db -f1)
+ file_to_fix=$(find $SP_DIR/cantera -name "_cantera*.so" | head -n 1)
+ ${OTOOL:-otool} -L $file_to_fix
+ ${INSTALL_NAME_TOOL:-install_name_tool} -change build/lib/libcantera.${VERSION}.dylib "@rpath/libcantera.${VERSION}.dylib" $file_to_fix
+fi
