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

Embed libintl in linphone SDK MacOSX

parent c498d65c
......@@ -47,11 +47,16 @@ list(GET SPLITTED_LINPHONE_VERSION 2 LINPHONE_MICRO_VERSION)
# Translates absolute internal dependency path of FFMepeg libraries into relative path on MacOSX
if(APPLE)
set(LINPHONE_SDK_TMP ${CMAKE_CURRENT_BINARY_DIR}/linphone-sdk-tmp)
file(REMOVE_RECURSE ${LINPHONE_SDK_TMP})
file(COPY ${LINPHONE_OUTPUT_DIR} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(RENAME ${CMAKE_CURRENT_BINARY_DIR}/OUTPUT ${LINPHONE_SDK_TMP})
set(RPATH_CHANGE_CMDS
-change ${LINPHONE_OUTPUT_DIR}/lib/libavcodec.53.61.100.dylib @rpath/libavcodec.53.61.100.dylib
-change ${LINPHONE_OUTPUT_DIR}/lib/libavutil.51.35.100.dylib @rpath/libavutil.51.35.100.dylib
-change ${LINPHONE_OUTPUT_DIR}/lib/libswscale.2.1.100.dylib @rpath/libswscale.2.1.100.dylib
-change ${LINPHONE_OUTPUT_DIR}/lib/libswresample.0.6.100.dylib @rpath/libswresample.0.6.100.dylib
-change /opt/local/lib/libintl.8.dylib @rpath/libintl.8.dylib
)
set(RPATH_LIBS_TO_MODIFY
libavcodec.53.61.100.dylib
......@@ -63,10 +68,16 @@ if(APPLE)
)
foreach(LIB_TO_CHANGE ${RPATH_LIBS_TO_MODIFY})
execute_process(
COMMAND install_name_tool ${RPATH_CHANGE_CMDS} ${LINPHONE_OUTPUT_DIR}/lib/${LIB_TO_CHANGE}
COMMAND install_name_tool -id @rpath/${LIB_TO_CHANGE} ${LINPHONE_OUTPUT_DIR}/lib/${LIB_TO_CHANGE}
COMMAND install_name_tool ${RPATH_CHANGE_CMDS} ${LINPHONE_SDK_TMP}/lib/${LIB_TO_CHANGE}
COMMAND install_name_tool -id @rpath/${LIB_TO_CHANGE} ${LINPHONE_SDK_TMP}/lib/${LIB_TO_CHANGE}
COMMAND install_name_tool -delete_rpath ${LINPHONE_OUTPUT_DIR}/lib ${LINPHONE_SDK_TMP}/lib/${LIB_TO_CHANGE}
)
endforeach()
file(COPY /opt/local/lib/libintl.8.dylib /opt/local/lib/libintl.dylib /opt/local/lib/libiconv.dylib /opt/local/lib/libiconv.2.dylib DESTINATION ${LINPHONE_SDK_TMP}/lib)
execute_process(
COMMAND install_name_tool -id @rpath/libintl.8.dylib -change /opt/local/lib/libiconv.2.dylib @rpath/libiconv.2.dylib ${LINPHONE_SDK_TMP}/lib/libintl.8.dylib
COMMAND install_name_tool -id @rpath/libiconv.2.dylib ${LINPHONE_SDK_TMP}/lib/libiconv.2.dylib
)
endif()
# Generates a zip archive containing the development files of liblinphone
......@@ -80,7 +91,7 @@ elseif(APPLE)
execute_process(
COMMAND rm -rf ${CMAKE_BINARY_DIR}/linphone-sdk-${LINPHONE_GIT_REVISION}-mac.zip
COMMAND zip -ry ${CMAKE_BINARY_DIR}/linphone-sdk-${LINPHONE_GIT_REVISION}-mac.zip . -i @${CMAKE_SOURCE_DIR}/linphone-sdk-mac.list
WORKING_DIRECTORY ${LINPHONE_OUTPUT_DIR}
WORKING_DIRECTORY ${LINPHONE_SDK_TMP}
)
endif()
......
......@@ -5,3 +5,4 @@
./lib/mediastreamer/plugins
./share/images/nowebcamCIF.jpg
./share/sounds/*
./share/locale/*
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