Copy libraries in the package explicitely for Mac OS X.

This commit is contained in:
Ghislain MARY 2017-05-17 16:54:43 +02:00
parent 1673b19960
commit e560d4cf93

View file

@ -216,6 +216,10 @@ elseif(APPLE)
configure_file("Info.plist.in" "Linphone.app/Contents/Info.plist" @ONLY)
configure_file("linphone.icns" "Linphone.app/Contents/Resources/linphone.icns" COPYONLY)
file(COPY "${LINPHONE_OUTPUT_DIR}/bin/linphone" DESTINATION "Linphone.app/Contents/MacOS")
file(GLOB SHARED_LIBRARIES "${LINPHONE_OUTPUT_DIR}/lib/lib*.dylib")
foreach(_library ${SHARED_LIBRARIES})
file(COPY "${_library}" DESTINATION "Linphone.app/Contents/Frameworks")
endforeach()
find_program(DEPLOYQT_PROGRAM macdeployqt)
if(NOT DEPLOYQT_PROGRAM)
@ -237,7 +241,7 @@ elseif(APPLE)
file(COPY "${LINPHONE_OUTPUT_DIR}/share/Linphone/assistant/create-linphone-sip-account.rc" DESTINATION "Linphone.app/Contents/Resources/share/linphone/assistant")
file(COPY "${LINPHONE_OUTPUT_DIR}/share/Linphone/assistant/use-linphone-sip-account.rc" DESTINATION "Linphone.app/Contents/Resources/share/linphone/assistant")
file(GLOB SHARED_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/Linphone.app/Contents/Frameworks/*.*.dylib")
file(GLOB SHARED_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/Linphone.app/Contents/Frameworks/lib*.dylib")
foreach(_library ${SHARED_LIBRARIES})
get_filename_component(_library_filename ${_library} NAME)
message("Changing RPATH of ${_library_filename} from '${LINPHONE_OUTPUT_DIR}/lib' to '@executable_path/../Frameworks'")