No longer add a suffix to the name of the libraries for Android.

This commit is contained in:
Ghislain MARY 2017-05-15 14:35:42 +02:00
parent 1a761ebe80
commit 8633c5b8b5
3 changed files with 7 additions and 41 deletions

View file

@ -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)

View file

@ -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<String> 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,

View file

@ -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)