From e560d4cf93dd02e1788442293a0e61867054988f Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 17 May 2017 16:54:43 +0200 Subject: [PATCH] Copy libraries in the package explicitely for Mac OS X. --- cmake_builder/linphone_package/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake_builder/linphone_package/CMakeLists.txt b/cmake_builder/linphone_package/CMakeLists.txt index 8ed8b0256..1439adef8 100644 --- a/cmake_builder/linphone_package/CMakeLists.txt +++ b/cmake_builder/linphone_package/CMakeLists.txt @@ -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'")