Commit 41d306b5 authored by François Grisez's avatar François Grisez
Browse files

Makes the code changing the id of libopenh264 more resilient to SO version upgrading

parent b416d5a9
......@@ -28,6 +28,16 @@ if(EXISTS ${INSTALL_PREFIX}/bin/openh264.dll AND NOT EXISTS ${INSTALL_PREFIX}/li
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "${SOURCE_DIR}/cmake/importlib.py" "${INSTALL_PREFIX}/bin/openh264.dll" "${INSTALL_PREFIX}/lib/openh264.lib")
endif()
if(EXISTS ${INSTALL_PREFIX}/lib/libopenh264.0.dylib)
execute_process(COMMAND install_name_tool -id @rpath/libopenh264.0.dylib ${INSTALL_PREFIX}/lib/libopenh264.0.dylib)
if(EXISTS ${INSTALL_PREFIX}/lib/libopenh264.1.dylib)
execute_process(COMMAND install_name_tool -id @rpath/libopenh264.1.dylib ${INSTALL_PREFIX}/lib/libopenh264.1.dylib)
endif()
file(GLOB OPENH264_LIBS "${INSTALL_PREFIX}/lib/libopenh264.*.dylib")
foreach(OPENH264_LIB IN LISTS ${OPENH264_LIBS})
string(REGEX REPLACE ".+/(libopenh264\..\.dylib)$"
"@rpath/\1"
OPENH264_LIB_ID
${OPENH264_LIB}
)
execute_process(COMMAND install_name_tool -id ${OPENH264_LIB_ID} ${OPENH264_LIB})
endforeach()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment