Commit 1c9f7d7a authored by Ghislain MARY's avatar Ghislain MARY

Add android support builder.

parent 16c7387b
......@@ -123,6 +123,7 @@ else()
add_dependencies(TARGET_ms2 TARGET_ortp TARGET_bctoolbox)
if(ANDROID)
linphone_builder_add_builder_to_target(TARGET_ms2 androidcpufeatures)
linphone_builder_add_builder_to_target(TARGET_ms2 androidsupport)
endif()
if(LINPHONE_BUILDER_BUILD_DEPENDENCIES)
linphone_builder_add_builder_to_target(TARGET_ms2 speex)
......
############################################################################
# androidsupport.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_androidsupport_EXTERNAL_SOURCE_PATHS "externals/build/support")
......@@ -34,7 +34,7 @@ endif()
set(EP_ms2_DEPENDENCIES EP_ortp EP_bctoolbox)
if(ANDROID)
list(APPEND EP_ms2_DEPENDENCIES EP_androidcpufeatures)
list(APPEND EP_ms2_DEPENDENCIES EP_androidcpufeatures EP_androidsupport)
endif()
if(MSVC)
set(EP_ms2_EXTRA_LDFLAGS "/SAFESEH:NO")
......
......@@ -139,10 +139,12 @@ else()
endif()
set(CMAKE_SYSROOT "${ANDROID_NDK_PATH}/platforms/android-${CMAKE_ANDROID_API}/arch-${ARCHITECTURE}")
set(ANDROID_SUPPORT "${ANDROID_NDK_PATH}/sources/android/support")
set(ANDROID_SUPPORT_INCLUDE_DIRS "${ANDROID_SUPPORT}/include")
message(STATUS "Using sysroot path: ${CMAKE_SYSROOT}")
set(CMAKE_FIND_ROOT_PATH "${CMAKE_SYSROOT}" "${CMAKE_INSTALL_PREFIX}")
set(CMAKE_FIND_ROOT_PATH "${CMAKE_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${ANDROID_SUPPORT}")
# search for programs in the build host directories
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
......@@ -159,7 +161,7 @@ elseif(EXISTS "${ANDROID_NDK_PATH}/sources/cpufeatures/cpu-features.c")
else()
message(FATAL_ERROR "Cannot find cpu-features.c")
endif()
include_directories(SYSTEM ${ANDROID_CPU_FEATURES_INCLUDE_DIRS} ${ANDROID_STL_INCLUDE_DIRS})
include_directories(SYSTEM ${ANDROID_CPU_FEATURES_INCLUDE_DIRS} ${ANDROID_STL_INCLUDE_DIRS} ${ANDROID_SUPPORT_INCLUDE_DIRS})
add_definitions("-DANDROID")
if(GCC_LIBRARY_PATH)
#link_directories("${GCC_LIBRARY_PATH}")
......
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