From 8633c5b8b5f589e91cbb77ce82150247468d7477 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Mon, 15 May 2017 14:35:42 +0200 Subject: [PATCH] No longer add a suffix to the name of the libraries for Android. --- coreapi/CMakeLists.txt | 5 --- .../core/LinphoneCoreFactoryImpl.java | 36 ++++--------------- tester/CMakeLists.txt | 7 ---- 3 files changed, 7 insertions(+), 41 deletions(-) diff --git a/coreapi/CMakeLists.txt b/coreapi/CMakeLists.txt index bcc15a96e..a4bdeb580 100644 --- a/coreapi/CMakeLists.txt +++ b/coreapi/CMakeLists.txt @@ -248,11 +248,6 @@ if(ENABLE_SHARED) set_target_properties(linphone PROPERTIES PREFIX "lib") elseif(ANDROID) target_link_libraries(linphone PUBLIC "log" ${SUPPORT_LIBRARIES} ${CPUFEATURES_LIBRARIES}) - if(ENABLE_ARCH_SUFFIX) - set_target_properties(linphone PROPERTIES OUTPUT_NAME "linphone-${CMAKE_ANDROID_ARCH_ABI}") - else() - set_target_properties(linphone PROPERTIES OUTPUT_NAME "linphone") - endif() add_dependencies(linphone linphonecore-jni-header) endif() if(MSVC) diff --git a/java/impl/org/linphone/core/LinphoneCoreFactoryImpl.java b/java/impl/org/linphone/core/LinphoneCoreFactoryImpl.java index 1c817de3c..1d511549c 100644 --- a/java/impl/org/linphone/core/LinphoneCoreFactoryImpl.java +++ b/java/impl/org/linphone/core/LinphoneCoreFactoryImpl.java @@ -32,8 +32,6 @@ import org.linphone.mediastream.Version; import org.linphone.tools.OpenH264DownloadHelper; public class LinphoneCoreFactoryImpl extends LinphoneCoreFactory { - public static String ABI; - private static boolean loadOptionalLibrary(String s) { try { System.loadLibrary(s); @@ -45,34 +43,14 @@ public class LinphoneCoreFactoryImpl extends LinphoneCoreFactory { } static { - List cpuabis = Version.getCpuAbis(); - boolean libLoaded = false; - Throwable firstException = null; System.loadLibrary("gnustl_shared"); - for (String abi : cpuabis) { - android.util.Log.i("LinphoneCoreFactoryImpl", "Trying to load liblinphone for " + abi); - loadOptionalLibrary("ffmpeg-linphone-" + abi); - //Main library - try { - System.loadLibrary("bctoolbox-" + abi); - System.loadLibrary("ortp-" + abi); - System.loadLibrary("mediastreamer_base-" + abi); - System.loadLibrary("mediastreamer_voip-" + abi); - System.loadLibrary("linphone-" + abi); - ABI = abi; - libLoaded = true; - break; - } catch(Throwable e) { - if (firstException == null) firstException = e; - } - } - - if (!libLoaded){ - throw new RuntimeException(firstException); - - }else{ - Version.dumpCapabilities(); - } + loadOptionalLibrary("ffmpeg-linphone"); + System.loadLibrary("bctoolbox"); + System.loadLibrary("ortp"); + System.loadLibrary("mediastreamer_base"); + System.loadLibrary("mediastreamer_voip"); + System.loadLibrary("linphone"); + Version.dumpCapabilities(); } @Override public LinphoneAuthInfo createAuthInfo(String username, String password, diff --git a/tester/CMakeLists.txt b/tester/CMakeLists.txt index aca831e90..45e83bb6c 100644 --- a/tester/CMakeLists.txt +++ b/tester/CMakeLists.txt @@ -223,13 +223,6 @@ endif() # on mobile platforms, we compile the tester as a library so that we can link with it directly from native applications if(ANDROID OR IOS) add_library(linphonetester SHARED ${SOURCE_FILES_C}) - if(ANDROID) - if(ENABLE_ARCH_SUFFIX) - set_target_properties(linphonetester PROPERTIES OUTPUT_NAME "linphonetester-${CMAKE_ANDROID_ARCH_ABI}") - else() - set_target_properties(linphonetester PROPERTIES OUTPUT_NAME "linphonetester") - endif() - endif() target_include_directories(linphonetester PUBLIC ${BCTOOLBOX_TESTER_INCLUDE_DIRS}) target_link_libraries(linphonetester ${LINPHONE_LIBS_FOR_TOOLS} ${OTHER_LIBS_FOR_TESTER}) if(IOS)