Commit 08520b0c authored by Ghislain MARY's avatar Ghislain MARY

Use gnustl library on Android instead of the llvm-libc++ that is not considered stable.

parent 8ba08026
......@@ -124,7 +124,6 @@ else()
if(ANDROID)
linphone_builder_add_builder_to_target(TARGET_ms2 androidcpufeatures)
linphone_builder_add_builder_to_target(TARGET_ms2 androidsupport)
linphone_builder_add_builder_to_target(TARGET_ms2 androidcpplib)
endif()
if(LINPHONE_BUILDER_BUILD_DEPENDENCIES)
linphone_builder_add_builder_to_target(TARGET_ms2 speex)
......
############################################################################
# androidcpplib.cmake
# Copyright (C) 2016 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
set(EP_androidcpplib_EXTERNAL_SOURCE_PATHS "externals/build/cpplib")
......@@ -132,6 +132,12 @@ set(EP_x264_LINKING_TYPE "--enable-static" "--enable-pic")
set(EP_x264_INSTALL_TARGET "install-lib-static")
# Copy c++ library to install prefix
file(COPY "${ANDROID_NDK_PATH}/sources/cxx-stl/gnu-libstdc++/${GCC_VERSION}/libs/${CMAKE_SYSTEM_PROCESSOR}/libgnustl_shared.so"
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib"
)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# GDB server setup
linphone_builder_apply_flags()
......
......@@ -21,7 +21,7 @@
############################################################################
set(CMAKE_ANDROID_API 14)
set(CMAKE_ANDROID_STL_TYPE c++_shared)
set(CMAKE_ANDROID_STL_TYPE gnustl_shared)
include(CMakeForceCompiler)
......@@ -153,7 +153,7 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK_PATH}/sources/cxx-stl/llvm-libc++/libcxx/include")
set(ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK_PATH}/sources/cxx-stl/gnu-libstdc++/${GCC_VERSION}/include" "${ANDROID_NDK_PATH}/sources/cxx-stl/gnu-libstdc++/${GCC_VERSION}/libs/${CMAKE_SYSTEM_PROCESSOR}/include")
if(EXISTS "${ANDROID_NDK_PATH}/sources/android/cpufeatures/cpu-features.c")
set(ANDROID_CPU_FEATURES_INCLUDE_DIRS "${ANDROID_NDK_PATH}/sources/android/cpufeatures")
elseif(EXISTS "${ANDROID_NDK_PATH}/sources/cpufeatures/cpu-features.c")
......@@ -172,6 +172,6 @@ if(GCC_LIBRARY_PATH)
set(CMAKE_MODULE_LINKER_FLAGS "-L${GCC_LIBRARY_PATH}" CACHE STRING "linker flags" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS "-L${GCC_LIBRARY_PATH}" CACHE STRING "linker flags" FORCE)
endif()
link_libraries("${ANDROID_NDK_PATH}/sources/cxx-stl/llvm-libc++/libs/${CMAKE_SYSTEM_PROCESSOR}/libc++_shared.so")
link_libraries("${ANDROID_NDK_PATH}/sources/cxx-stl/gnu-libstdc++/${GCC_VERSION}/libs/${CMAKE_SYSTEM_PROCESSOR}/libgnustl_shared.so")
link_libraries("log")
link_libraries("atomic")
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