Commit cd4c45fb authored by Matthieu Tanon's avatar Matthieu Tanon
Browse files

Merge branch 'master' into dev_lime_v2

parents 699deac8 8560844a
......@@ -21,18 +21,39 @@
############################################################################
cmake_minimum_required(VERSION 3.0)
project(androidsupport LANGUAGES CXX)
project(androidsupport LANGUAGES C CXX)
include(GNUInstallDirs)
set(SUPPORT_SOURCES
"${CMAKE_ANDROID_NDK}/sources/android/support/src/iswblank.cpp"
)
if(CMAKE_ANDROID_NDK_VERSION VERSION_LESS 16)
set(SUPPORT_SOURCES
"${CMAKE_ANDROID_NDK}/sources/android/support/src/musl-multibyte/wctomb.c"
)
else()
set(SUPPORT_SOURCES
"${CMAKE_ANDROID_NDK}/sources/android/support/src/iswblank.cpp"
)
endif()
add_library(support STATIC ${SUPPORT_SOURCES})
target_include_directories(support PUBLIC "${CMAKE_ANDROID_NDK}/sources/android/support/include")
if(CMAKE_ANDROID_NDK_VERSION VERSION_LESS 16)
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
target_compile_options(support PRIVATE "-std=c99")
endif()
if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
install(FILES
"${CMAKE_ANDROID_NDK}/sources/android/support/include/ctype.h"
"${CMAKE_ANDROID_NDK}/sources/android/support/include/langinfo.h"
"${CMAKE_ANDROID_NDK}/sources/android/support/include/nl_types.h"
"${CMAKE_ANDROID_NDK}/sources/android/support/include/xlocale.h"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
endif()
endif()
install(TARGETS support
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
......
############################################################################
# antlr3c.cmake
# Copyright (C) 2014 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
lcb_git_repository("git://git.linphone.org/antlr3.git")
lcb_git_tag_latest("linphone")
lcb_git_tag("52075ffb35975c6901e924b4a763b6fb23abd623")
lcb_external_source_paths("antlr3c" "antlr3" "externals/antlr3")
lcb_may_be_found_on_system(YES)
lcb_ignore_warnings(YES)
lcb_cmake_options("-DENABLE_DEBUGGER=NO")
......@@ -35,9 +35,6 @@ if(ENABLE_TUNNEL)
endif()
if(LINPHONE_BUILDER_BUILD_DEPENDENCIES)
if(NOT DISABLE_BC_ANTLR)
lcb_dependencies("antlr3c")
endif()
if(NOT APPLE AND NOT ANDROID AND NOT QNX)
lcb_dependencies("zlib")
endif()
......
......@@ -29,4 +29,7 @@ lcb_package_source(YES)
lcb_spec_file("belr.spec")
lcb_dependencies("bctoolbox")
lcb_cmake_options("-DENABLE_TOOLS=${ENABLE_TOOLS}")
lcb_cmake_options(
"-DENABLE_TOOLS=${ENABLE_TOOLS}"
"-DENABLE_TESTS=${ENABLE_UNIT_TESTS}"
)
......@@ -26,13 +26,17 @@ lcb_git_tag("cc4e47496600e9b1d3d412ce6e887275c204334b")
lcb_external_source_paths("<LINPHONE_BUILDER_TOP_DIR>")
lcb_groupable(YES)
#set(EP_flexisip_CONFIG_H_FILE "flexisip.spec")
if(ENABLE_PRESENCE)
lcb_rpmbuild_name("flexisip-presence")
endif()
lcb_spec_file("flexisip.spec")
lcb_dependencies("sofiasip")
lcb_dependencies("bellesip")
if(ENABLE_CONFERENCE)
lcb_dependencies("linphone" "belr")
endif()
if(ENABLE_PRESENCE OR ENABLE_MDNS)
lcb_dependencies("bellesip")
endif()
if(ENABLE_SOCI)
lcb_dependencies("soci")
endif()
......@@ -57,5 +61,6 @@ lcb_cmake_options(
"-DENABLE_SNMP=${ENABLE_SNMP}"
"-DENABLE_DOC=${ENABLE_DOC}"
"-DENABLE_PROTOBUF=${ENABLE_PROTOBUF}"
"-DENABLE_MDNS=${ENABLE_MDNS}"
)
......@@ -29,7 +29,7 @@ lcb_package_source(YES)
lcb_spec_file("liblinphone.spec")
lcb_rpmbuild_name("liblinphone")
lcb_dependencies("bctoolbox" "bellesip" "ortp" "ms2" "belr" "libxsd" "soci")
lcb_dependencies("bctoolbox" "bellesip" "ortp" "ms2" "ms2plugins" "belr" "libxsd" "soci")
if(LINPHONE_BUILDER_BUILD_DEPENDENCIES AND NOT APPLE)
# Do not build sqlite3, xml2 and zlib on Apple systems (Mac OS X and iOS), they are provided by the system
lcb_dependencies("sqlite3" "xml2")
......
......@@ -26,6 +26,7 @@ include(FeatureSummary)
set(ep_base "${LINPHONE_BUILDER_WORK_DIR}/${CONFIG_NAME}")
set_property(DIRECTORY PROPERTY EP_BASE ${ep_base})
set(LINPHONE_BUILDER_OPTIONS_DIR "${CMAKE_CURRENT_LIST_DIR}/../options")
# Define the architecture. It will be used to generate the URL to get prebuilt dependencies.
......@@ -279,9 +280,6 @@ macro(linphone_builder_include_builder BUILDER INCLUDE_AFTER DEPENDENCIES _inclu
if(EXISTS "${_builder_filepath}")
message(STATUS "Including builder ${BUILDER}")
set(LINPHONE_BUILDER_CURRENT_BUILDER "${BUILDER}")
if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/../options/${BUILDER}.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/../options/${BUILDER}.cmake)
endif()
include(${_builder_filepath})
if(INCLUDE_AFTER)
list(APPEND ${DEPENDENCIES} ${BUILDER})
......@@ -1168,6 +1166,9 @@ macro(lcb_builder_dependencies BUILDER)
endif()
if(_add_dependency)
list(APPEND EP_${BUILDER}_DEPENDENCIES "EP_${_dependency}")
if(EXISTS ${LINPHONE_BUILDER_OPTIONS_DIR}/${_dependency}.cmake)
include(${LINPHONE_BUILDER_OPTIONS_DIR}/${_dependency}.cmake)
endif()
endif()
endforeach()
endmacro()
......
......@@ -48,7 +48,6 @@ set(DEFAULT_VALUE_ENABLE_WEBRTC_AECM ON)
set(DEFAULT_VALUE_ENABLE_WEBRTC_AEC ON)
set(DEFAULT_VALUE_ENABLE_ZRTP ON)
set(DEFAULT_VALUE_ENABLE_LIME ON)
set(DEFAULT_VALUE_ENABLE_LIME_X3DH OFF)
set(DEFAULT_VALUE_ENABLE_TOOLS OFF)
set(DEFAULT_VALUE_ENABLE_JAVA_WRAPPER ON)
set(ENABLE_NLS NO CACHE BOOL "" FORCE)
......@@ -88,6 +87,9 @@ lcb_builder_cmake_options(belcard "-DENABLE_UNIT_TESTS=NO")
# belle-sip
lcb_builder_cmake_options(bellesip "-DENABLE_TESTS=NO")
# belr
lcb_builder_cmake_options(belr "-DENABLE_TESTS=NO")
# bzrtp
lcb_builder_cmake_options(bzrtp "-DENABLE_TESTS=NO")
......@@ -163,9 +165,15 @@ lcb_builder_install_target(x264 "install-lib-static")
# Copy c++ library to install prefix
file(COPY "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${CMAKE_ANDROID_ARCH_ABI}/libc++_shared.so"
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib"
)
if(CMAKE_ANDROID_NDK_VERSION VERSION_LESS 16)
file(COPY "${CMAKE_ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${CMAKE_CXX_ANDROID_TOOLCHAIN_VERSION}/libs/${CMAKE_ANDROID_ARCH_ABI}/libgnustl_shared.so"
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib"
)
else()
file(COPY "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${CMAKE_ANDROID_ARCH_ABI}/libc++_shared.so"
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib"
)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
......
......@@ -84,9 +84,6 @@ include(builders/CMakeLists.txt)
# bctoolbox
lcb_builder_cmake_options(bctoolbox "-DENABLE_TESTS_COMPONENT=${ENABLE_UNIT_TESTS}")
# bellesip
lcb_builder_cmake_options(bellesip "-DENABLE_MDNS=YES")
# linphone
lcb_builder_cmake_options(linphone
"-DENABLE_CONSOLE_UI=NO"
......
......@@ -41,7 +41,6 @@ set(DEFAULT_VALUE_ENABLE_VIDEO ON)
set(DEFAULT_VALUE_ENABLE_VPX ON)
set(DEFAULT_VALUE_ENABLE_ZRTP ON)
set(DEFAULT_VALUE_ENABLE_LIME ON)
set(DEFAULT_VALUE_ENABLE_LIME_X3DH OFF)
set(DEFAULT_VALUE_ENABLE_TOOLS OFF)
set(DEFAULT_VALUE_ENABLE_STATIC_ONLY OFF)
set(ENABLE_NLS NO CACHE BOOL "" FORCE)
......
......@@ -37,7 +37,6 @@ set(DEFAULT_VALUE_ENABLE_VPX ON)
set(DEFAULT_VALUE_ENABLE_WASAPI ON)
set(DEFAULT_VALUE_ENABLE_ZRTP ON)
set(DEFAULT_VALUE_ENABLE_LIME ON)
set(DEFAULT_VALUE_ENABLE_LIME_X3DH OFF)
set(DEFAULT_VALUE_ENABLE_TOOLS OFF)
set(ENABLE_NLS NO CACHE BOOL "" FORCE)
......
......@@ -30,7 +30,6 @@ set(DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES ON)
set(DEFAULT_VALUE_ENABLE_GSM ON)
set(DEFAULT_VALUE_ENABLE_JPEG ON)
set(DEFAULT_VALUE_ENABLE_LIME ON)
set(DEFAULT_VALUE_ENABLE_LIME_X3DH OFF)
set(DEFAULT_VALUE_ENABLE_MBEDTLS ON)
set(DEFAULT_VALUE_ENABLE_MKV ON)
set(DEFAULT_VALUE_ENABLE_OPUS ON)
......
......@@ -94,7 +94,6 @@ elseif(APPLE)
endif()
set(LIST_FILES )
add_list_file(bctoolbox)
add_list_file(antlr3c)
add_list_file(bellesip)
add_list_file(ortp)
add_list_file(ms2)
......
......@@ -24,7 +24,7 @@
lcb_add_option("Tunnel" "Secure tunnel for SIP/RTP (require license)." "${DEFAULT_VALUE_ENABLE_TUNNEL}")
lcb_add_option("RTP Map always in SDP" "Always include rtpmap in SDP." OFF)
lcb_add_option("mDNS" "Multicast DNS support" OFF)
lcb_add_option("mDNS" "Multicast DNS support" "${DEFAULT_VALUE_ENABLE_MDNS}")
option(DISABLE_BC_ANTLR "Do not build Antlr as part of the CMake builder, and instead use the system version" "${DEFAULT_VALUE_DISABLE_BC_ANTLR}")
add_feature_info("Belledonne Antlr" DISABLE_BC_ANTLR "Do not build the Belledonne version of Antlr3c")
......@@ -23,11 +23,11 @@
# Linphone build options
lcb_add_option("GTK UI" "Enable the GTK user interface of Linphone." "${DEFAULT_VALUE_ENABLE_GTK_UI}")
lcb_add_option("CXX_WRAPPER" "Build the C++ wrapper for Liblinphone." "${DEFAULT_VALUE_ENABLE_CXX_WRAPPER}")
lcb_add_option("CSHARP_WRAPPER" "Build the C# wrapper from Liblinphone." "${DEFAULT_VALUE_ENABLE_CSHARP_WRAPPER}")
lcb_add_option("JAVA_WRAPPER" "Build the Java wrapper from Liblinphone." "${DEFAULT_VALUE_ENABLE_JAVA_WRAPPER}")
lcb_add_option("CXX wrapper" "Build the C++ wrapper for Liblinphone." "${DEFAULT_VALUE_ENABLE_CXX_WRAPPER}")
lcb_add_option("CSharp wrapper" "Build the C# wrapper from Liblinphone." "${DEFAULT_VALUE_ENABLE_CSHARP_WRAPPER}")
lcb_add_option("Java wrapper" "Build the Java wrapper from Liblinphone." "${DEFAULT_VALUE_ENABLE_JAVA_WRAPPER}")
lcb_add_option("LIME" "Enable Linphone IM Encryption support in Liblinphone." "${DEFAULT_VALUE_ENABLE_LIME}")
lcb_add_option("LIME_X3DH" "Enable Linphone IM Encryption version 2 support in Liblinphone." "${DEFAULT_VALUE_ENABLE_LIME_X3DH}")
lcb_add_option("LIME X3DH" "Enable Linphone IM Encryption version 2 support in Liblinphone." "${DEFAULT_VALUE_ENABLE_LIME_X3DH}")
lcb_add_option("NLS" "Enable internationalization of Linphone and Liblinphone." "${DEFAULT_VALUE_ENABLE_NLS}")
lcb_add_option("Update Check" "Enable update check." "${DEFAULT_VALUE_ENABLE_UPDATE_CHECK}")
lcb_add_option("VCARD" "Enable vCard 4 support in Linphone and Liblinphone." "${DEFAULT_VALUE_ENABLE_VCARD}")
......
......@@ -20,17 +20,29 @@
#
############################################################################
find_program(ANDROID_NDK_BUILD_PROGRAM ndk-build)
if(NOT ANDROID_NDK_BUILD_PROGRAM)
message(FATAL_ERROR "Cannot find 'ndk-build', make sure you installed the NDK and added it to your PATH")
set(CMAKE_ANDROID_NDK "$ENV{ANDROID_NDK_HOME}")
if(NOT CMAKE_ANDROID_NDK)
find_program(ANDROID_NDK_BUILD_PROGRAM ndk-build)
if(NOT ANDROID_NDK_BUILD_PROGRAM)
message(FATAL_ERROR "Cannot find 'ndk-build', make sure you installed the NDK and added it to your PATH")
endif()
get_filename_component(CMAKE_ANDROID_NDK "${ANDROID_NDK_BUILD_PROGRAM}" DIRECTORY)
endif()
get_filename_component(CMAKE_ANDROID_NDK "${ANDROID_NDK_BUILD_PROGRAM}" DIRECTORY)
file(READ "${CMAKE_ANDROID_NDK}/source.properties" SOURCE_PROPERTIES_CONTENT)
string(REGEX MATCH "Pkg\\.Revision = ([0-9]+)\\." NDK_VERSION_MATCH "${SOURCE_PROPERTIES_CONTENT}")
set(CMAKE_ANDROID_NDK_VERSION ${CMAKE_MATCH_1})
set(CMAKE_SYSTEM_NAME "Android")
if(NOT CMAKE_ANDROID_API)
set(CMAKE_ANDROID_API 16)
endif()
set(CMAKE_ANDROID_STL_TYPE "c++_shared")
if(CMAKE_ANDROID_NDK_VERSION VERSION_LESS 16)
set(CMAKE_ANDROID_STL_TYPE "gnustl_shared")
else()
set(CMAKE_ANDROID_STL_TYPE "c++_shared")
endif()
set(CMAKE_FIND_ROOT_PATH "${CMAKE_SYSROOT}" "${CMAKE_INSTALL_PREFIX}")
# search for programs in the build host directories
......
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