...
 
Commits (56)
......@@ -20,7 +20,7 @@
#
############################################################################
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.1)
include(FeatureSummary)
......@@ -74,7 +74,6 @@ else()
linphone_builder_get_autotools_configuration()
endif()
# Add external projects
linphone_builder_add_projects()
linphone_builder_add_dummy_libraries_generation()
......@@ -85,7 +84,6 @@ else()
include(${LINPHONE_BUILDER_ADDITIONAL_CONFIG_STEPS})
endif()
# Give a feature summary
feature_summary(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")
feature_summary(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:")
......
This diff is collapsed.
This diff is collapsed.
......@@ -36,8 +36,8 @@ elseif(CMAKE_ANDROID_NDK_VERSION VERSION_LESS 17)
)
else()
set(SUPPORT_SOURCES
"${CMAKE_ANDROID_NDK}/sources/android/support/src/locale_support.cpp"
)
"${CMAKE_ANDROID_NDK}/sources/android/support/src/locale_support.cpp"
)
endif()
add_library(support STATIC ${SUPPORT_SOURCES})
......
......@@ -35,7 +35,7 @@ if(ENABLE_TUNNEL)
lcb_dependencies("tunnel")
endif()
if(NOT APPLE AND NOT ANDROID AND NOT QNX)
if(NOT APPLE AND NOT ANDROID AND NOT QNX AND ENABLE_ZLIB)
lcb_dependencies("zlib")
endif()
......
......@@ -31,8 +31,13 @@ lcb_spec_file("bzrtp.spec")
lcb_dependencies("bctoolbox")
if(NOT APPLE)
# Do not build xml2 neither sqlite3 on Apple systems (Mac OS X and iOS), they are provided by the system
lcb_dependencies("xml2" "sqlite3")
# Do not build xml2 neither sqlite3 on Apple systems (Mac OS X and iOS), they are provided by the system
if (ENABLE_SQLITE)
lcb_dependencies("sqlite3")
endif()
if (ENABLE_XML2)
lcb_dependencies("xml2")
endif()
endif()
if(ENABLE_UNIT_TESTS)
lcb_dependencies("bcunit")
......
......@@ -158,8 +158,12 @@ else()
lcb_configure_options("--cc=$CC")
endif()
include(GNUInstallDirs)
lcb_cross_compilation_options(
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--libdir=${CMAKE_INSTALL_FULL_LIBDIR}"
"--shlibdir=${CMAKE_INSTALL_FULL_LIBDIR}"
"--arch=${FFMPEG_ARCH}"
"--target-os=${FFMPEG_TARGET_OS}"
)
......
......@@ -52,6 +52,7 @@ endif()
lcb_cmake_options(
"-DENABLE_TRANSCODER=${ENABLE_TRANSCODER}"
"-DENABLE_UNIT_TESTS=${ENABLE_UNIT_TESTS}"
"-DENABLE_ODBC=NO"
"-DENABLE_REDIS=${ENABLE_REDIS}"
"-DENABLE_SOCI=${ENABLE_SOCI}"
......@@ -64,3 +65,8 @@ lcb_cmake_options(
"-DENABLE_JWE_AUTH_PLUGIN=${ENABLE_JWE_AUTH_PLUGIN}"
"-DENABLE_EXTERNAL_AUTH_PLUGIN=${ENABLE_EXTERNAL_AUTH_PLUGIN}"
)
if (DEFINED SYSCONF_INSTALL_DIR)
lcb_cmake_options(
"-DSYSCONF_INSTALL_DIR=${SYSCONF_INSTALL_DIR}"
)
endif()
......@@ -25,4 +25,6 @@ lcb_external_source_paths("externals/jose")
lcb_spec_file("jose.spec")
lcb_dependencies("jansson")
lcb_dependencies("zlib")
if (ENABLE_ZLIB)
lcb_dependencies("zlib")
endif()
......@@ -20,7 +20,7 @@
#
############################################################################
lcb_git_repository("gitosis@git.linphone.org:lime.git")
lcb_git_repository("https://gitlab.linphone.org/BC/public/lime.git")
lcb_git_tag_latest("master")
lcb_git_tag("master")
lcb_external_source_paths("lime")
......@@ -32,3 +32,8 @@ lcb_dependencies("bctoolbox" "soci")
if(ENABLE_UNIT_TESTS)
lcb_dependencies("bellesip")
endif()
lcb_cmake_options(
"-DENABLE_C_INTERFACE=yes"
"-DENABLE_UNIT_TESTS=${ENABLE_UNIT_TESTS}"
)
......@@ -30,17 +30,41 @@ lcb_package_source(YES)
lcb_spec_file("liblinphone.spec")
lcb_rpmbuild_name("liblinphone")
lcb_dependencies("bctoolbox" "bellesip" "ortp" "ms2" "ms2plugins" "belr" "libxsd" "soci")
lcb_dependencies("bctoolbox" "bellesip" "ortp" "ms2" "ms2plugins" "belr")
if(ENABLE_DB_STORAGE)
lcb_dependencies("soci")
else()
# Do not add group chat if we don't have soci
set(ENABLE_ADVANCED_IM OFF CACHE BOOL "Enable advanced instant messaging such as group chat." FORCE)
endif()
if(ENABLE_ADVANCED_IM AND NOT USE_SYSTEM_XSD)
lcb_dependencies("libxsd")
endif()
if(NOT ENABLE_ADVANCED_IM OR NOT ENABLE_DB_STORAGE)
# Having lime is pointless without one of those
set(ENABLE_LIME_X3DH OFF CACHE BOOL "Enable lime X3DH support." FORCE)
endif()
if(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")
if(NOT ANDROID AND NOT QNX)
if (ENABLE_SQLITE)
lcb_dependencies("sqlite3")
endif()
if (ENABLE_XML2)
lcb_dependencies("xml2")
endif()
if(NOT ANDROID AND NOT QNX AND ENABLE_ZLIB)
lcb_dependencies("zlib")
endif()
endif()
if(ENABLE_TUNNEL)
lcb_dependencies("tunnel")
endif()
if(ENABLE_VCARD)
lcb_dependencies("belcard")
endif()
......@@ -48,6 +72,7 @@ endif()
if(ENABLE_LIME_X3DH)
lcb_dependencies("lime")
endif()
lcb_cmake_options(
"-DENABLE_GTK_UI=${ENABLE_GTK_UI}"
"-DENABLE_VIDEO=${ENABLE_VIDEO}"
......@@ -56,6 +81,7 @@ lcb_cmake_options(
"-DENABLE_TOOLS=${ENABLE_TOOLS}"
"-DENABLE_NLS=${ENABLE_NLS}"
"-DENABLE_LIME=${ENABLE_LIME}"
"-DENABLE_LIME_X3DH=${ENABLE_LIME_X3DH}"
"-DENABLE_UNIT_TESTS=${ENABLE_UNIT_TESTS}"
"-DENABLE_POLARSSL=${ENABLE_POLARSSL}"
"-DENABLE_MBEDTLS=${ENABLE_MBEDTLS}"
......@@ -65,6 +91,11 @@ lcb_cmake_options(
"-DENABLE_VCARD=${ENABLE_VCARD}"
"-DENABLE_CXX_WRAPPER=${ENABLE_CXX_WRAPPER}"
"-DENABLE_CSHARP_WRAPPER=${ENABLE_CSHARP_WRAPPER}"
"-DENABLE_SWIFT_WRAPPER=${ENABLE_SWIFT_WRAPPER}"
"-DENABLE_JAZZY_DOC=${ENABLE_JAZZY_DOC}"
"-DENABLE_JAVA_WRAPPER=${ENABLE_JAVA_WRAPPER}"
"-DENABLE_QRCODE=${ENABLE_QRCODE}"
"-DENABLE_ASSETS=${ENABLE_ASSETS}"
"-DENABLE_DB_STORAGE=${ENABLE_DB_STORAGE}"
"-DENABLE_ADVANCED_IM=${ENABLE_ADVANCED_IM}"
)
......@@ -25,6 +25,7 @@ lcb_git_tag_latest("linphone")
lcb_git_tag("3b88f2749d59e5346de08e121fba1d797c55ddaa")
lcb_external_source_paths("mbedtls" "externals/mbedtls" "external/mbedtls")
lcb_may_be_found_on_system(YES)
lcb_sanitizable(YES)
lcb_ignore_warnings(YES)
lcb_linking_type("-DUSE_STATIC_MBEDTLS_LIBRARY=NO" "-DUSE_SHARED_MBEDTLS_LIBRARY=YES")
......
......@@ -26,7 +26,9 @@ lcb_git_tag("d65cd2ea9d740f62884e0beaf8ab86740620c783")
lcb_external_source_paths("externals/minizip")
lcb_spec_file("minizip.spec")
lcb_dependencies("zlib")
if (ENABLE_ZLIB)
lcb_dependencies("zlib")
endif()
lcb_cmake_options(
"-DUSE_AES=NO"
......
......@@ -32,7 +32,11 @@ lcb_rpmbuild_name("mediastreamer")
lcb_dependencies("ortp" "bctoolbox")
if(ANDROID)
lcb_dependencies("androidcpufeatures" "androidsupport")
if(CMAKE_ANDROID_NDK_VERSION VERSION_LESS 19)
lcb_dependencies("androidcpufeatures" "androidsupport")
else()
lcb_dependencies("androidcpufeatures")
endif()
endif()
lcb_cmake_options(
......@@ -71,7 +75,7 @@ if(ENABLE_G729 OR ENABLE_G729B_CNG)
lcb_dependencies("bcg729")
endif()
if(ENABLE_JPEG)
lcb_dependencies("turbo-jpeg")
lcb_dependencies("turbojpeg")
endif()
if(ENABLE_QRCODE)
lcb_dependencies("zxing")
......@@ -93,6 +97,7 @@ if(ENABLE_VIDEO)
if(ENABLE_VPX)
lcb_dependencies("vpx")
endif()
lcb_cmake_options("-DENABLE_V4L=${ENABLE_V4L}")
endif()
if(ENABLE_GTK_UI)
lcb_cmake_options("-DENABLE_GL=NO")
......
......@@ -47,6 +47,15 @@ endif()
if(ENABLE_VIDEO AND (CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone"))
lcb_dependencies("mswp8vid")
endif()
if(ENABLE_VIDEO AND (CMAKE_SYSTEM_NAME STREQUAL "WindowsStore"))
if(ENABLE_VIDEO AND WIN32)
lcb_dependencies("mswinrtvid")
endif()
if (ENABLE_AAUDIO)
lcb_dependencies("msaaudio")
endif()
if (ENABLE_CAMERA2)
lcb_dependencies("msandroidcamera2")
endif()
if (ENABLE_ELPH264)
lcb_dependencies("mselph264")
endif()
############################################################################
# msaaudio.cmake
# Copyright (C) 2019 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("https://gitlab.linphone.org/BC/public/msaaudio.git")
lcb_git_tag_latest("master")
lcb_git_tag("master")
lcb_external_source_paths("msaaudio")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_plugin(YES)
lcb_dependencies("ms2")
lcb_cmake_options(
"-DENABLE_AAUDIO=${ENABLE_AAUDIO}"
"-DENABLE_SANITIZER=${ENABLE_SANITIZER}"
)
############################################################################
# msandroidcamera2.cmake
# Copyright (C) 2019 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("https://gitlab.linphone.org/BC/public/msandroidcamera2.git")
lcb_git_tag_latest("master")
lcb_git_tag("master")
lcb_external_source_paths("msandroidcamera2")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_plugin(YES)
lcb_dependencies("ms2")
lcb_cmake_options(
"-DENABLE_CAMERA2=${ENABLE_CAMERA2}"
"-DENABLE_SANITIZER=${ENABLE_SANITIZER}"
)
############################################################################
# mselph264.cmake
# Copyright (C) 2019 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("https://gitlab.linphone.org/BC/public/mselph264.git")
lcb_git_tag_latest("master")
lcb_git_tag("master")
lcb_external_source_paths("mselph264")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_plugin(YES)
lcb_dependencies("ms2")
lcb_cmake_options(
"-DENABLE_ELPH264=${ENABLE_ELPH264}"
)
......@@ -56,6 +56,8 @@ else()
set(ADDITIONAL_OPTIONS "${ADDITIONAL_OPTIONS} ARCH=\"arm\" INCLUDE_PREFIX=\"arm-linux-androideabi\"")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(ADDITIONAL_OPTIONS "${ADDITIONAL_OPTIONS} ARCH=\"arm64\" INCLUDE_PREFIX=\"aarch64-linux-android\"")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(ADDITIONAL_OPTIONS "${ADDITIONAL_OPTIONS} ARCH=\"x86_64\" ENABLEPIC=\"Yes\" INCLUDE_PREFIX=\"i686-linux-android\"")
else()
set(ADDITIONAL_OPTIONS "${ADDITIONAL_OPTIONS} ARCH=\"x86\" ENABLEPIC=\"Yes\" INCLUDE_PREFIX=\"i686-linux-android\"")
endif()
......
......@@ -24,8 +24,8 @@ if(EXISTS ${INSTALL_PREFIX}/bin/openh264.dll AND NOT EXISTS ${INSTALL_PREFIX}/li
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "${SOURCE_DIR}/cmake/importlib.py" "${INSTALL_PREFIX}/bin/openh264.dll" "${INSTALL_PREFIX}/lib/openh264.lib")
endif()
if(EXISTS ${INSTALL_PREFIX}/lib/libopenh264.1.dylib)
execute_process(COMMAND install_name_tool -id @rpath/libopenh264.1.dylib ${INSTALL_PREFIX}/lib/libopenh264.1.dylib)
if(EXISTS ${INSTALL_PREFIX}/lib/libopenh264.4.dylib)
execute_process(COMMAND install_name_tool -id @rpath/libopenh264.4.dylib ${INSTALL_PREFIX}/lib/libopenh264.4.dylib)
endif()
file(GLOB OPENH264_LIBS "${INSTALL_PREFIX}/lib/libopenh264.*.dylib")
......@@ -38,6 +38,14 @@ foreach(OPENH264_LIB IN LISTS ${OPENH264_LIBS})
execute_process(COMMAND install_name_tool -id ${OPENH264_LIB_ID} ${OPENH264_LIB})
endforeach()
if(EXISTS ${INSTALL_PREFIX}/lib/libopenh264.a AND TOOLCHAIN_RANLIB)
execute_process(COMMAND "${TOOLCHAIN_RANLIB}" "${INSTALL_PREFIX}/lib/libopenh264.a")
if(EXISTS ${INSTALL_PREFIX}/lib/libopenh264.a)
if (TOOLCHAIN_RANLIB)
execute_process(COMMAND "${TOOLCHAIN_RANLIB}" "${INSTALL_PREFIX}/lib/libopenh264.a")
message (STATUS "ranlib done with TOOLCHAIN_RANLIB = ${TOOLCHAIN_RANLIB} on ${INSTALL_PREFIX}/lib/libopenh264.a")
elseif (CMAKE_RANLIB)
execute_process(COMMAND "${CMAKE_RANLIB}" "${INSTALL_PREFIX}/lib/libopenh264.a")
message (STATUS "ranlib done with CMAKE_RANLIB = ${CMAKE_RANLIB} on ${INSTALL_PREFIX}/lib/libopenh264.a")
else()
message(FATAL_ERROR "No ranlib tool defined, cannot postinstall ${INSTALL_PREFIX}/lib/libopenh264.a")
endif()
endif()
......@@ -21,7 +21,7 @@
############################################################################
if(LINPHONE_BUILDER_PREBUILT_URL)
set(OPUS_FILENAME "opus-1.0.3-${LINPHONE_BUILDER_ARCHITECTURE}.zip")
set(OPUS_FILENAME "opus-1.3.1-${LINPHONE_BUILDER_ARCHITECTURE}.zip")
file(DOWNLOAD "${LINPHONE_BUILDER_PREBUILT_URL}/${OPUS_FILENAME}" "${CMAKE_CURRENT_BINARY_DIR}/${OPUS_FILENAME}" STATUS OPUS_FILENAME_STATUS)
list(GET OPUS_FILENAME_STATUS 0 OPUS_DOWNLOAD_STATUS)
if(NOT OPUS_DOWNLOAD_STATUS)
......@@ -33,8 +33,8 @@ if(OPUS_PREBUILT)
lcb_url("${CMAKE_CURRENT_BINARY_DIR}/${OPUS_FILENAME}")
lcb_build_method("prebuilt")
else()
lcb_url("http://downloads.xiph.org/releases/opus/opus-1.1.1.tar.gz")
lcb_url_hash("MD5=cfb354d4c65217ca32a762f8ab15f2ac")
lcb_url("http://downloads.xiph.org/releases/opus/opus-1.3.1.tar.gz")
lcb_url_hash("MD5=d7c07db796d21c9cf1861e0c2b0c0617")
lcb_external_source_paths("opus" "externals/opus" "external/opus")
lcb_may_be_found_on_system(YES)
lcb_ignore_warnings(YES)
......
......@@ -23,14 +23,20 @@
lcb_git_repository("https://gitlab.linphone.org/BC/public/external/soci.git")
lcb_external_source_paths("externals/soci" "external/soci")
if(NOT APPLE)
# Do not build sqlite3 on Apple systems (Mac OS X and iOS), it is provided by the system
lcb_dependencies("sqlite3")
# Do not build sqlite3 on Apple systems (Mac OS X and iOS), it is provided by the system
if (ENABLE_SQLITE)
lcb_dependencies("sqlite3")
endif()
endif()
lcb_cmake_options(
"-DSOCI_TESTS=NO"
"-DWITH_SQLITE3=YES"
)
if (ENABLE_SOCI_MYSQL)
lcb_cmake_options("-DWITH_MYSQL=YES")
endif()
lcb_package_source(YES)
lcb_spec_file("soci.spec")
lcb_linking_type("-DSOCI_SHARED=YES" "-DSOCI_STATIC=NO")
......
......@@ -27,4 +27,3 @@ lcb_may_be_found_on_system(YES)
lcb_linking_type("-DENABLE_STATIC=YES" "-DENABLE_SHARED=NO")
lcb_extra_cflags("-fPIC")
......@@ -135,7 +135,10 @@ else()
else()
set(VPX_TARGET "x86-android-gcc")
endif()
lcb_configure_options("--sdk-path=${CMAKE_ANDROID_NDK}/" )
lcb_configure_options(
"--sdk-path=${CMAKE_ANDROID_NDK}/"
"--android_ndk_api=${ANDROID_NATIVE_API_LEVEL}"
)
lcb_linking_type("--enable-static" "--disable-shared" "--enable-pic")
elseif(QNX)
set(VPX_TARGET "armv7-qnx-gcc")
......@@ -145,10 +148,13 @@ else()
"--disable-runtime-cpu-detect"
)
list(REMOVE_ITEM EP_vpx_CONFIGURE_OPTIONS "--enable-multithread")
else()
else()
lcb_use_c_compiler_for_assembler(NO)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l")
set(VPX_TARGET "armv7-linux-gcc")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm")
#A bit hacky, but CMAKE_SYSTEM_PROCESSOR sometimes doesn't include abi version so assume `armv7` by default
set(VPX_TARGET "armv7-linux-gcc")
else()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(VPX_TARGET "x86_64-linux-gcc")
......@@ -162,6 +168,7 @@ else()
if(USE_TARGET)
lcb_cross_compilation_options(
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--libdir=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}"
"--target=${VPX_TARGET}"
)
else()
......@@ -173,4 +180,7 @@ else()
lcb_configure_options("--disable-avx512")
endif()
lcb_configure_env("CC=$CC_NO_LAUNCHER LD=$CC_NO_LAUNCHER ASFLAGS=$ASFLAGS CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS")
# BUILD_ROOT is set by Xcode, but we still need the current build root.
# See https://gitlab.linphone.org/BC/public/external/libvpx/blob/v1.7.0-linphone/build/make/Makefile
lcb_make_options("BUILD_ROOT=.")
endif()
@if "%1" == "15" goto vs15
@if "%1" == "14" goto vs14
@if "%1" == "12" goto vs12
@if "%1" == "11" goto vs11
......@@ -6,6 +7,11 @@
@if "%1" == "9" goto vs9
@goto end
:vs15
:: No more env variable without load VsDevCmd script
@call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
@goto printenv
:vs14
@call "%VS140COMNTOOLS%vsvars32.bat"
@goto printenv
......
......@@ -20,6 +20,7 @@
#
############################################################################
include(GNUInstallDirs)
include(ExternalProject)
include(${CMAKE_CURRENT_LIST_DIR}/LinphoneOptions.cmake)
......@@ -60,8 +61,10 @@ macro(linphone_builder_expand_external_project_vars)
set(target_info_list ${target_info_list})
list(GET varname_and_vartype 0 _varname)
list(GET varname_and_vartype 1 _vartype)
list(APPEND LINPHONE_BUILDER_EP_ARGS -D${_varname}:${_vartype}=${${_varname}})
list(APPEND LINPHONE_BUILDER_EP_VARNAMES ${_varname})
if (DEFINED ${_varname})
list(APPEND LINPHONE_BUILDER_EP_ARGS -D${_varname}:${_vartype}=${${_varname}})
list(APPEND LINPHONE_BUILDER_EP_VARNAMES ${_varname})
endif()
endforeach()
endmacro()
......@@ -71,15 +74,20 @@ list(APPEND LINPHONE_BUILDER_EP_VARS
CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL
CMAKE_BUNDLE_OUTPUT_DIRECTORY:PATH
CMAKE_C_COMPILER_LAUNCHER:PATH
CMAKE_C_FLAGS:STRING
CMAKE_CXX_FLAGS:STRING
CMAKE_C_FLAGS_DEBUG:STRING
CMAKE_C_FLAGS_MINSIZEREL:STRING
CMAKE_C_FLAGS_RELEASE:STRING
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING
CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES:LIST
CMAKE_CXX_COMPILER_LAUNCHER:PATH
CMAKE_CXX_FLAGS_DEBUG:STRING
CMAKE_CXX_FLAGS_MINSIZEREL:STRING
CMAKE_CXX_FLAGS_RELEASE:STRING
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING
CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES:LIST
CMAKE_EXE_LINKER_FLAGS:STRING
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING
......@@ -88,19 +96,23 @@ list(APPEND LINPHONE_BUILDER_EP_VARS
CMAKE_GENERATOR_PLATFORM:STRING
CMAKE_INSTALL_MESSAGE:STRING
CMAKE_INSTALL_PREFIX:PATH
CMAKE_SYSTEM_PREFIX_PATH:LIST
CMAKE_INSTALL_RPATH:PATH
CMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL
CMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH
CMAKE_MODULE_LINKER_FLAGS:STRING
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING
CMAKE_MODULE_PATH:PATH
CMAKE_NO_BUILD_TYPE:BOOL
CMAKE_NO_BUILD_TYPE:BOOL
CMAKE_NO_SYSTEM_FROM_IMPORTED:BOOL
CMAKE_PREFIX_PATH:STRING
CMAKE_STAGING_PREFIX:STRING
CMAKE_PROGRAM_PATH:STRING
CMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH
CMAKE_SHARED_LINKER_FLAGS:STRING
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING
......@@ -114,6 +126,31 @@ list(APPEND LINPHONE_BUILDER_EP_VARS
MSVC_CXX_ARCHITECTURE_ID:STRING
MSVC_VERSION:STRING
)
#Inherit GnuInstallDirs variables
foreach(dir
BINDIR
SBINDIR
LIBEXECDIR
SYSCONFDIR
SHAREDSTATEDIR
LOCALSTATEDIR
RUNSTATEDIR
LIBDIR
INCLUDEDIR
OLDINCLUDEDIR
DATAROOTDIR
DATADIR
INFODIR
LOCALEDIR
MANDIR
DOCDIR
)
list(APPEND LINPHONE_BUILDER_EP_VARS
CMAKE_INSTALL_${dir}:PATH
CMAKE_INSTALL_FULL_${dir}:PATH
)
endforeach()
if(CMAKE_CROSSCOMPILING)
list(APPEND LINPHONE_BUILDER_EP_VARS
CMAKE_SYSTEM_NAME:STRING
......@@ -319,9 +356,19 @@ macro(linphone_builder_add_builder_to_target TARGETNAME BUILDER INCLUDE_AFTER DE
endif()
endmacro()
macro(linphone_builder_apply_flags)
string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE)
if (CMAKE_CONFIGURATION_TYPES)
FOREACH(CONFIG_NAME ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER "${CONFIG_NAME}" CONFIG_NAME_UPPER)
linphone_builder_apply_flags_for_build_type(${CONFIG_NAME_UPPER})
ENDFOREACH(CONFIG_NAME)
else()
string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE)
linphone_builder_apply_flags_for_build_type(${BUILD_TYPE})
endif()
endmacro()
macro(linphone_builder_apply_flags_for_build_type BUILD_TYPE)
if(LINPHONE_BUILDER_OSX_ARCHITECTURES)
set(CMAKE_OSX_ARCHITECTURES ${LINPHONE_BUILDER_OSX_ARCHITECTURES})
set(AUTOTOOLS_ARCH "-arch ${CMAKE_OSX_ARCHITECTURES}")
......@@ -378,17 +425,28 @@ endmacro()
macro(linphone_builder_apply_extra_flags PROJNAME)
string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE)
if (CMAKE_CONFIGURATION_TYPES)
FOREACH(CONFIG_NAME ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER "${CONFIG_NAME}" CONFIG_NAME_UPPER)
linphone_builder_apply_extra_flags_for_build_type(${PROJNAME} ${CONFIG_NAME_UPPER})
ENDFOREACH(CONFIG_NAME)
else()
string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE)
linphone_builder_apply_extra_flags_for_build_type(${PROJNAME} ${BUILD_TYPE})
endif()
endmacro()
macro(linphone_builder_apply_extra_flags_for_build_type PROJNAME BUILD_TYPE)
if(MSVC)
set(_no_warnings_flag "/W0")
else()
set(_no_warnings_flag "-w")
endif()
set(SAVED_CMAKE_C_FLAGS "${CMAKE_C_FLAGS_${BUILD_TYPE}}")
set(SAVED_CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_${BUILD_TYPE}}")
set(SAVED_CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS_${BUILD_TYPE}}")
set(SAVED_CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS_${BUILD_TYPE}}")
set(SAVED_CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_${BUILD_TYPE}}")
set(SAVED_CMAKE_C_FLAGS_${BUILD_TYPE} "${CMAKE_C_FLAGS_${BUILD_TYPE}}")
set(SAVED_CMAKE_CXX_FLAGS_${BUILD_TYPE} "${CMAKE_CXX_FLAGS_${BUILD_TYPE}}")
set(SAVED_CMAKE_EXE_LINKER_FLAGS_${BUILD_TYPE} "${CMAKE_EXE_LINKER_FLAGS_${BUILD_TYPE}}")
set(SAVED_CMAKE_MODULE_LINKER_FLAGS_${BUILD_TYPE} "${CMAKE_MODULE_LINKER_FLAGS_${BUILD_TYPE}}")
set(SAVED_CMAKE_SHARED_LINKER_FLAGS_${BUILD_TYPE} "${CMAKE_SHARED_LINKER_FLAGS_${BUILD_TYPE}}")
if(EP_${PROJNAME}_BUILD_METHOD STREQUAL "autotools")
set(ep_asflags "${ep_asflags} ${EP_${PROJNAME}_EXTRA_ASFLAGS}")
set(ep_cppflags "${ep_cppflags} ${EP_${PROJNAME}_EXTRA_CPPFLAGS}")
......@@ -415,27 +473,29 @@ macro(linphone_builder_apply_extra_flags PROJNAME)
set(CMAKE_C_FLAGS_${BUILD_TYPE} "${CMAKE_C_FLAGS_${BUILD_TYPE}} ${_no_warnings_flag}")
set(CMAKE_CXX_FLAGS_${BUILD_TYPE} "${CMAKE_CXX_FLAGS_${BUILD_TYPE}} ${_no_warnings_flag}")
endif()
if(ENABLE_SANITIZER AND EP_${PROJNAME}_SANITIZABLE)
set(sanitize_flags "-fsanitize=address,undefined")
set(CMAKE_C_FLAGS_${BUILD_TYPE} "${CMAKE_C_FLAGS_${BUILD_TYPE}} ${sanitize_flags}")
set(CMAKE_CXX_FLAGS_${BUILD_TYPE} "${CMAKE_CXX_FLAGS_${BUILD_TYPE}} ${sanitize_flags}")
set(CMAKE_EXE_LINKER_FLAGS_${BUILD_TYPE} "${CMAKE_EXE_LINKER_FLAGS_${BUILD_TYPE}} ${sanitize_flags}")
set(CMAKE_MODULE_LINKER_FLAGS_${BUILD_TYPE} "${CMAKE_MODULE_LINKER_FLAGS_${BUILD_TYPE}} ${sanitize_flags}")
set(CMAKE_SHARED_LINKER_FLAGS_${BUILD_TYPE} "${CMAKE_SHARED_LINKER_FLAGS_${BUILD_TYPE}} ${sanitize_flags}")
unset(sanitize_flags)
endif()
endif()
unset(BUILD_TYPE)
endmacro()
macro(linphone_builder_restore_flags)
string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE)
set(CMAKE_C_FLAGS_${BUILD_TYPE} "${SAVED_CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS_${BUILD_TYPE} "${SAVED_CMAKE_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS_${BUILD_TYPE} "${SAVED_CMAKE_EXE_LINKER_FLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS_${BUILD_TYPE} "${SAVED_CMAKE_MODULE_LINKER_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS_${BUILD_TYPE} "${SAVED_CMAKE_SHARED_LINKER_FLAGS}")
if (CMAKE_CONFIGURATION_TYPES)
FOREACH(CONFIG_NAME ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER "${CONFIG_NAME}" CONFIG_NAME_UPPER)
linphone_builder_restore_flags_for_build_type(${CONFIG_NAME_UPPER})
ENDFOREACH(CONFIG_NAME)
else()
string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE)
linphone_builder_restore_flags_for_build_type(${BUILD_TYPE})
endif()
endmacro()
macro(linphone_builder_restore_flags_for_build_type BUILD_TYPE)
set(CMAKE_C_FLAGS_${BUILD_TYPE} "${SAVED_CMAKE_C_FLAGS_${BUILD_TYPE}}")
set(CMAKE_CXX_FLAGS_${BUILD_TYPE} "${SAVED_CMAKE_CXX_FLAGS_${BUILD_TYPE}}")
set(CMAKE_EXE_LINKER_FLAGS_${BUILD_TYPE} "${SAVED_CMAKE_EXE_LINKER_FLAGS_${BUILD_TYPE}}")
set(CMAKE_MODULE_LINKER_FLAGS_${BUILD_TYPE} "${SAVED_CMAKE_MODULE_LINKER_FLAGS_${BUILD_TYPE}}")
set(CMAKE_SHARED_LINKER_FLAGS_${BUILD_TYPE} "${SAVED_CMAKE_SHARED_LINKER_FLAGS_${BUILD_TYPE}}")
unset(BUILD_TYPE)
endmacro()
......@@ -822,7 +882,7 @@ macro(linphone_builder_add_external_project PROJNAME)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/builders/${PROJNAME}/postinstall.cmake)
ExternalProject_Add_Step(EP_${PROJNAME} postinstall
COMMAND ${CMAKE_COMMAND} -DTOOLCHAIN_RANLIB=${TOOLCHAIN_RANLIB} -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DINSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -P ${CMAKE_CURRENT_SOURCE_DIR}/builders/${PROJNAME}/postinstall.cmake
COMMAND ${CMAKE_COMMAND} -DTOOLCHAIN_RANLIB=${TOOLCHAIN_RANLIB} -DCMAKE_RANLIB=${CMAKE_RANLIB} -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DINSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -P ${CMAKE_CURRENT_SOURCE_DIR}/builders/${PROJNAME}/postinstall.cmake
COMMENT "Performing post-installation for 'EP_${PROJNAME}'"
DEPENDEES install
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
......
......@@ -78,7 +78,8 @@ if(WIN32)
endif()
find_program(PATCH_PROGRAM
NAMES patch patch.exe
NAMES patch patch.exe
CMAKE_FIND_ROOT_PATH_BOTH
)
if(NOT PATCH_PROGRAM)
if(WIN32)
......@@ -89,7 +90,8 @@ if(NOT PATCH_PROGRAM)
endif()
find_program(SED_PROGRAM
NAMES sed sed.exe
NAMES sed sed.exe
CMAKE_FIND_ROOT_PATH_BOTH
)
if(NOT SED_PROGRAM)
if(WIN32)
......
#!/system/bin/sh
HERE="$(cd "$(dirname "$0")" && pwd)"
export ASAN_OPTIONS=log_to_syslog=false,allow_user_segv_handler=1
export ASAN_OPTIONS=log_to_syslog=false,allow_user_segv_handler=1,symbolize=1,fast_unwind_on_malloc=0
export LD_PRELOAD=$HERE/libclang_rt.asan-@SANITIZER_ARCH@-android.so
"$@"
......@@ -72,7 +72,7 @@ lcb_builder_extra_cflags(codec2 "-ffast-math")
lcb_builder_linking_type(ffmpeg "--enable-static" "--disable-shared" "--enable-pic")
# lime
lcb_builder_cmake_options(lime "-DENABLE_UNIT_TESTS=NO")
lcb_builder_cmake_options(lime "-DENABLE_UNIT_TESTS=NO" "-DENABLE_JNI=YES")
# linphone
lcb_builder_cmake_options(linphone "-DENABLE_RELATIVE_PREFIX=YES")
......@@ -107,11 +107,7 @@ if(NOT ENABLE_EMBEDDED_OPENH264)
endif()
# opus
lcb_builder_cmake_options(opus "-DENABLE_FIXED_POINT=YES")
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv5te")
lcb_builder_cmake_options(opus "-DENABLE_ASM=NO")
lcb_builder_cmake_options(opus "-DENABLE_INTRINSICS=NO")
endif()
lcb_builder_cmake_options(opus "-DOPUS_FIXED_POINT=YES")
# ortp
lcb_builder_cmake_options(ortp "-DENABLE_DOC=NO")
......@@ -137,20 +133,37 @@ lcb_builder_linking_type(vpx "--enable-static" "--disable-shared")
lcb_builder_linking_type(x264 "--enable-static" "--enable-pic")
lcb_builder_install_target(x264 "install-lib-static")
#Copy c++ library to install prefix
#The library has to be present for cmake dependencies and before the install target
file(COPY "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${CMAKE_ANDROID_ARCH_ABI}/libc++_shared.so" DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/")
# 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(ENABLE_SANITIZER)
set(SANITIZER_ARCH ${CMAKE_SYSTEM_PROCESSOR})
if(SANITIZER_ARCH MATCHES "^arm")
set(SANITIZER_ARCH "arm")
endif()
file(GLOB_RECURSE _clang_rt_library "${CMAKE_ANDROID_NDK}/toolchains/llvm/prebuilt/${ANDROID_HOST_TAG}/*/clang/*/lib/linux/libclang_rt.asan-${SANITIZER_ARCH}-android.so")
if(_clang_rt_library)
list(GET _clang_rt_library 0 _clang_rt_library)
file(COPY ${_clang_rt_library} DESTINATION "${CMAKE_INSTALL_PREFIX}/lib")
#DO NOT REMOVE NOW !!!
# It SEEMS to be useless as the sanitizer builds without these lines on ndk 20 and sdk 28.
# Need to check with others versions.
#we search for liblog.so in the folder of the ndk, then if it is found we add it to the linker flags
#find_library(log_library log PATHS "${CMAKE_ANDROID_NDK}/toolchains/llvm/prebuilt/${ANDROID_HOST_TAG}/sysroot/")
#if(NOT DEFINED log_library-NOTFOUND)
#set(CMAKE_EXE_LINKER_FLAGS "${_clang_rt_library} ${log_library} ${CMAKE_EXE_LINKER_FLAGS}")
# message("if find library config android")
# message("if find library config android CMAKE_EXE_LINKER_FLAGS = ${CMAKE_EXE_LINKER_FLAGS}")
# message("if find library config android _clang_rt_library = ${_clang_rt_library}")
# message("if find library config android log_library = ${log_library}")
#else()
# message(fatal_error "LOG LIBRARY NOT FOUND. It is mandatory for the Android Sanitizer")
#endif()
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/configs/android/wrap.sh.cmake" "${CMAKE_INSTALL_PREFIX}/lib/wrap.sh" @ONLY)
endif()
endif()
......
......@@ -25,7 +25,9 @@ lcb_add_option("Theora" "Theora video encoding/decoding support." "${DEFAULT_VAL
lcb_add_option("Static only" "Enable compilation of libraries in static mode." "${DEFAULT_VALUE_ENABLE_STATIC_ONLY}")
lcb_add_option("Packaging" "Enable packaging" "${DEFAULT_VALUE_ENABLE_PACKAGING}")
lcb_add_option("Source packaging" "Enable source packaging" "${DEFAULT_VALUE_ENABLE_SOURCE_PACKAGING}")
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
set(LINPHONE_BUILDER_LDFLAGS "${LINPHONE_BUILDER_LDFLAGS} -Wl,--fatal-warnings -Wl,-warn-common")
endif()
if(ENABLE_STATIC_ONLY)
set(DEFAULT_VALUE_CMAKE_LINKING_TYPE "-DENABLE_SHARED=NO" "-DENABLE_STATIC=YES")
......@@ -93,6 +95,7 @@ include(builders/CMakeLists.txt)
# linphone
if(WIN32)
lcb_builder_cmake_options(linphone "-DENABLE_RELATIVE_PREFIX=YES")
lcb_builder_extra_ldflags(linphone "/SAFESEH:NO")
else()
lcb_builder_cmake_options(linphone "-DENABLE_RELATIVE_PREFIX=${ENABLE_RELATIVE_PREFIX}")
endif()
......@@ -123,8 +126,11 @@ if(ENABLE_STATIC_ONLY)
# polarssl
lcb_builder_linking_type(polarssl "-DUSE_SHARED_POLARSSL_LIBRARY=0")
else()
# openh264
lcb_builder_linking_type(openh264 "-shared")
if (NOT ENABLE_EMBEDDED_OPENH264)
# openh264
lcb_builder_linking_type(openh264 "-shared")
endif()
lcb_builder_linking_type(opus "-DBUILD_SHARED_LIBS=YES")
endif()
# voamrwbenc
......
......@@ -61,7 +61,7 @@ lcb_builder_cross_compilation_options(ffmpeg
)
# opus
lcb_builder_cmake_options(opus "-DENABLE_FIXED_POINT=YES")
lcb_builder_cmake_options(opus "-DOPUS_FIXED_POINT=YES")
# speex
lcb_builder_cmake_options(speex
......
......@@ -58,3 +58,65 @@ endif()
if(NOT LINPHONE_BUILDER_ADDITIONAL_CONFIG_STEPS)
set(LINPHONE_BUILDER_ADDITIONAL_CONFIG_STEPS "${CMAKE_CURRENT_LIST_DIR}/desktop/additional_steps.cmake")
endif()
if (MSVC)
lcb_builder_linking_type(mbedtls "-DUSE_STATIC_MBEDTLS_LIBRARY=YES" "-DUSE_SHARED_MBEDTLS_LIBRARY=NO")
endif()
if(APPLE)
set(DEFAULT_VALUE_CMAKE_LINKING_TYPE "-DENABLE_SHARED=NO" "-DENABLE_STATIC=YES")
# bctoolbox
lcb_builder_linking_type(bctoolbox "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
# belcard
lcb_builder_linking_type(belcard "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
# belr
lcb_builder_linking_type(belr "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
# lime
lcb_builder_linking_type(lime "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
# linphone
lcb_builder_cmake_options(linphone "-DENABLE_RELATIVE_PREFIX=YES")
lcb_builder_cmake_options(linphone "-DENABLE_CONSOLE_UI=NO")
lcb_builder_cmake_options(linphone "-DENABLE_DAEMON=NO")
lcb_builder_cmake_options(linphone "-DENABLE_NOTIFY=NO")
lcb_builder_cmake_options(linphone "-DENABLE_TUTORIALS=NO")
lcb_builder_cmake_options(linphone "-DENABLE_UPNP=NO")
lcb_builder_cmake_options(linphone "-DENABLE_MSG_STORAGE=YES")
lcb_builder_cmake_options(linphone "-DENABLE_DOC=NO")
lcb_builder_cmake_options(linphone "-DENABLE_NLS=NO")
lcb_builder_linking_type(linphone "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
# mbedtls
lcb_builder_linking_type(mbedtls "-DUSE_STATIC_MBEDTLS_LIBRARY=YES" "-DUSE_SHARED_MBEDTLS_LIBRARY=NO")
# mediastreamer2
lcb_builder_cmake_options(ms2 "-DENABLE_RELATIVE_PREFIX=YES")
lcb_builder_cmake_options(ms2 "-DENABLE_ALSA=NO")
lcb_builder_cmake_options(ms2 "-DENABLE_PULSEAUDIO=NO")
lcb_builder_cmake_options(ms2 "-DENABLE_OSS=NO")
lcb_builder_cmake_options(ms2 "-DENABLE_GLX=NO")
lcb_builder_cmake_options(ms2 "-DENABLE_X11=NO")
lcb_builder_cmake_options(ms2 "-DENABLE_XV=NO")
lcb_builder_cmake_options(ms2 "-DENABLE_DOC=NO")
lcb_builder_linking_type(ms2 "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
# ms2 plugins
lcb_builder_linking_type(msamr "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
lcb_builder_linking_type(mscodec2 "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
lcb_builder_linking_type(msopenh264 "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
lcb_builder_linking_type(mssilk "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
lcb_builder_linking_type(mswebrtc "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
lcb_builder_linking_type(msx264 "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
# ortp
lcb_builder_cmake_options(ortp "-DENABLE_DOC=NO")
lcb_builder_linking_type(ortp "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
# bellesip
lcb_builder_linking_type(bellesip "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
endif()
......@@ -37,7 +37,7 @@ function(CHECK_LIBRARY libname)
endif()
endfunction()
set(FLEXISIP_LIBDEPS ssl mysqlclient_r mysqlclient)
set(FLEXISIP_LIBDEPS ssl)
foreach(LIBNAME ${FLEXISIP_LIBDEPS})
check_library(${LIBNAME})
......@@ -64,15 +64,20 @@ if(LSB_RELEASE_DISTRO STREQUAL "Debian" AND (LSB_RELEASE_DISTRO_VERSION STREQUAL
else()
set(DEFAULT_VALUE_ENABLE_MBEDTLS ON)
endif()
set(DEFAULT_VALUE_ENABLE_TRANSCODER ON)
set(DEFAULT_VALUE_ENABLE_REDIS ON)
set(DEFAULT_VALUE_ENABLE_SOCI ON)
set(DEFAULT_VALUE_ENABLE_ASSETS ON)
set(DEFAULT_VALUE_ENABLE_UNIT_TESTS OFF)
set(ENABLE_SRTP NO CACHE BOOL "" FORCE) # Mainly to avoid issues with old libsrtp (sha1_update conflict with polarssl)
set(DEFAULT_VALUE_ENABLE_ADVANCED_IM ON)
set(DEFAULT_VALUE_ENABLE_DB_STORAGE ON)
set(DEFAULT_VALUE_CMAKE_LINKING_TYPE "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
# Global configuration
set(LINPHONE_BUILDER_HOST "")
set(USE_SYSTEM_XSD YES)
set(RPM_INSTALL_PREFIX "/opt/belledonne-communications")
set(LINPHONE_BUILDER_RPMBUILD_PACKAGE_PREFIX "bc-")
......@@ -95,6 +100,7 @@ lcb_builder_cmake_options(linphone
lcb_builder_cmake_options(soci
"-DWITH_MYSQL=ON"
"-DWITH_POSTGRESQL=ON"
"-DSOCI_SHARED=ON"
)
# prepare the RPMBUILD options that we need to pass
......
......@@ -21,16 +21,19 @@
############################################################################
# Define default values for the flexisip builder options
set(DEFAULT_VALUE_ENABLE_ADVANCED_IM ON)
set(DEFAULT_VALUE_ENABLE_DB_STORAGE ON)
set(DEFAULT_VALUE_ENABLE_REDIS ON)
set(DEFAULT_VALUE_ENABLE_UNIT_TESTS OFF)
set(DEFAULT_VALUE_ENABLE_UNIT_TESTS ON)
set(DEFAULT_VALUE_ENABLE_PRESENCE ON)
set(DEFAULT_VALUE_ENABLE_CONFERENCE ON)
set(DEFAULT_VALUE_ENABLE_SNMP OFF)
set(DEFAULT_VALUE_ENABLE_POLARSSL OFF)
set(DEFAULT_VALUE_ENABLE_MBEDTLS ON)
set(DEFAULT_VALUE_ENABLE_PROTOBUF OFF)
set(DEFAULT_VALUE_ENABLE_JWE_AUTH_PLUGIN OFF)
set(DEFAULT_VAULE_ENABLE_EXTERNAL_AUTH_PLUGIN OFF)
set(DEFAULT_VALUE_ENABLE_JWE_AUTH_PLUGIN ON)
set(DEFAULT_VAULE_ENABLE_EXTERNAL_AUTH_PLUGIN ON)
set(DEFAULT_VALUE_ENABLE_TRANSCODER ON)
set(DEFAULT_VALUE_ENABLE_SOCI ON)
set(DEFAULT_VALUE_ENABLE_VCARD OFF)
......@@ -43,6 +46,7 @@ set(DEFAULT_VALUE_ENABLE_SPEEX ON)
# Global configuration
set(LINPHONE_BUILDER_HOST "")
set(USE_SYSTEM_XSD YES)
# Adjust PKG_CONFIG_PATH to include install directory
if(UNIX)
......@@ -96,4 +100,4 @@ if(ENABLE_CONFERENCE)
endif()
# soci
lcb_builder_cmake_options(soci "-DWITH_MYSQL=ON")
lcb_builder_cmake_options(soci "-DWITH_MYSQL=ON" "-DSOCI_FRAMEWORK=OFF")
......@@ -31,7 +31,7 @@ set(CMAKE_INSTALL_RPATH "@executable_path/../Frameworks")
# Global configuration
if(NOT LINPHONE_IOS_DEPLOYMENT_TARGET)
set(LINPHONE_IOS_DEPLOYMENT_TARGET 8.0)
set(LINPHONE_IOS_DEPLOYMENT_TARGET 9.0)
endif()
set(LINPHONE_BUILDER_HOST "${CMAKE_SYSTEM_PROCESSOR}-apple-darwin")
set(COMMON_FLAGS "-miphoneos-version-min=${LINPHONE_IOS_DEPLOYMENT_TARGET} -fms-extensions")
......@@ -104,7 +104,7 @@ lcb_builder_linking_type(mswebrtc "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
lcb_builder_linking_type(msx264 "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
# opus
lcb_builder_cmake_options(opus "-DENABLE_FIXED_POINT=YES")
lcb_builder_cmake_options(opus "-DOPUS_FIXED_POINT=YES")
# ortp
lcb_builder_cmake_options(ortp "-DENABLE_DOC=NO")
......@@ -130,3 +130,5 @@ lcb_builder_linking_type(vpx "--enable-static" "--disable-shared")
lcb_builder_linking_type(x264 "--enable-static" "--enable-pic")
lcb_builder_install_target(x264 "install-lib-static")
# bellesip
lcb_builder_linking_type(bellesip "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
......@@ -42,7 +42,7 @@ lcb_builder_cross_compilation_options(ffmpeg
)
# opus
lcb_builder_cmake_options(opus "-DENABLE_FIXED_POINT=YES")
lcb_builder_cmake_options(opus "-DOPUS_FIXED_POINT=YES")
# speex
lcb_builder_cmake_options(speex "-DENABLE_FLOAT_API=NO")
......
......@@ -21,11 +21,14 @@
############################################################################
# Define default values for the linphone builder options
set(DEFAULT_VALUE_ENABLE_ADVANCED_IM ON)
set(DEFAULT_VALUE_ENABLE_DB_STORAGE ON)
set(DEFAULT_VALUE_ENABLE_FFMPEG ON)
set(DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES ON)
set(DEFAULT_VALUE_ENABLE_GSM ON)
set(DEFAULT_VALUE_ENABLE_G729 ${DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES})
set(DEFAULT_VALUE_ENABLE_G729B_CNG OFF)
set(DEFAULT_VALUE_ENABLE_LIME ON)
set(DEFAULT_VALUE_ENABLE_MBEDTLS ON)
set(DEFAULT_VALUE_ENABLE_MKV ON)
set(DEFAULT_VALUE_ENABLE_OPUS ON)
......@@ -36,7 +39,6 @@ set(DEFAULT_VALUE_ENABLE_VCARD ON)
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_TOOLS OFF)
set(ENABLE_NLS NO CACHE BOOL "" FORCE)
......
#####################################################################################################################################
# !Warning: be SURE YOU REALLY KNOW what you are doing before modifying this file!
#####################################################################################################################################
#New behaviour uses CMAKE_EXE_LINKER FLAGS FOR check_compile (we need it to avoid link errors)
#Old behaviour does not
#cmake_policy(SET CMP0056 NEW)
if(NOT CMAKE_C_COMPILER_ID MATCHES "Clang" OR NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
message(AUTHOR_WARNING "The sanitizer isn't currently supported for other compilers than Clang")
endif()
set(sanitize_flags "-fsanitize=address,undefined -fno-omit-frame-pointer -fno-optimize-sibling-calls")
set(sanitize_linker_flags "-fsanitize=address,undefined")
if (LINPHONESDK_PLATFORM STREQUAL "Android" OR DEFINED ANDROID)
#For some (unknow) reason, when -llog is passed in the linker flags, cmake seems
#to reset the linker flags. That's why it is actualy passed in compiler flags with -Wl
set(sanitize_flags "${sanitize_flags} -Wl,-llog")
else()
set(sanitize_linker_flags "${sanitize_linker_flags} -lasan -lubsan")
endif()
# these link options are prepended by a semicolon if the following quotes are missing.
# we must set this quotes to prevent cmake from considering the given set as a list append
# see https://cmake.org/cmake/help/v3.16/manual/cmake-language.7.html#cmake-language-variables
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${sanitize_flags}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${sanitize_flags}")
set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} ${sanitize_linker_flags})
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${sanitize_linker_flags}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${sanitize_linker_flags}")
#We need to put all these variables in cache so that cmake-builder external
# project variables passing includes correct values initially (from cache)
# (used very early in the build by toolchains)
#if this is not done the variables are reset
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "" FORCE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}" CACHE STRING "" FORCE)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}" CACHE STRING "" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}" CACHE STRING "" FORCE)
unset(sanitize_flags)
unset(sanitize_linker_flags)
......@@ -36,6 +36,8 @@ include(builders/CMakeLists.txt)
# linphone
lcb_builder_cmake_options(linphone "-DENABLE_CSHARP_WRAPPER=YES")
lcb_builder_cmake_options(linphone "-DENABLE_SWIFT_WRAPPER=NO")
lcb_builder_cmake_options(linphone "-DENABLE_JAZZY_DOC=NO")
lcb_builder_cmake_options(linphone "-DENABLE_RELATIVE_PREFIX=YES")
lcb_builder_cmake_options(linphone "-DENABLE_CONSOLE_UI=NO")
lcb_builder_cmake_options(linphone "-DENABLE_DAEMON=NO")
......@@ -48,6 +50,4 @@ lcb_builder_cmake_options(linphone "-DENABLE_SOCI=NO")
lcb_builder_cmake_options(ms2 "-DENABLE_RELATIVE_PREFIX=YES")
# opus
lcb_builder_cmake_options(opus "-DENABLE_ASM=NO")
lcb_builder_cmake_options(opus "-DENABLE_FIXED_POINT=YES")
lcb_builder_linking_type(opus "-DENABLE_SHARED=NO" "-DENABLE_STATIC=YES")
lcb_builder_cmake_options(opus "-DOPUS_FIXED_POINT=YES")
......@@ -26,21 +26,26 @@ lcb_add_dependent_option("Embedded OpenH264" "Embed the openh264 library instead
# Define default values for the linphone builder options
set(DEFAULT_VALUE_ENABLE_ADVANCED_IM ON)
set(DEFAULT_VALUE_ENABLE_DB_STORAGE ON)
set(DEFAULT_VALUE_ENABLE_FFMPEG OFF)
set(DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES ON)
set(DEFAULT_VALUE_ENABLE_G729 ${DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES})
set(DEFAULT_VALUE_ENABLE_G729B_CNG OFF)
set(DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES OFF)
set(DEFAULT_VALUE_ENABLE_GSM ON)
set(DEFAULT_VALUE_ENABLE_ILBC ON)
set(DEFAULT_VALUE_ENABLE_ISAC ON)
set(DEFAULT_VALUE_ENABLE_JAVA_WRAPPER ON)
set(DEFAULT_VALUE_ENABLE_JPEG ON)
set(DEFAULT_VALUE_ENABLE_LIME_X3DH ON)
set(DEFAULT_VALUE_ENABLE_MBEDTLS ON)
set(DEFAULT_VALUE_ENABLE_MKV ON)
set(DEFAULT_VALUE_ENABLE_OPUS ON)
set(DEFAULT_VALUE_ENABLE_QRCODE ON)
set(DEFAULT_VALUE_ENABLE_SILK OFF)
set(DEFAULT_VALUE_ENABLE_SPEEX ON)
set(DEFAULT_VALUE_ENABLE_G729 ${DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES})
set(DEFAULT_VALUE_ENABLE_G729B_CNG OFF)
set(DEFAULT_VALUE_ENABLE_SRTP ON)
set(DEFAULT_VALUE_ENABLE_UNIT_TESTS ON)
set(DEFAULT_VALUE_ENABLE_UNIT_TESTS OFF)
set(DEFAULT_VALUE_ENABLE_VCARD ON)
set(DEFAULT_VALUE_ENABLE_VIDEO ON)
set(DEFAULT_VALUE_ENABLE_VPX ON)
......@@ -48,5 +53,11 @@ set(DEFAULT_VALUE_ENABLE_WEBRTC_AECM ON)
set(DEFAULT_VALUE_ENABLE_WEBRTC_AEC ON)
set(DEFAULT_VALUE_ENABLE_ZRTP ON)
set(DEFAULT_VALUE_ENABLE_TOOLS OFF)
set(DEFAULT_VALUE_ENABLE_JAVA_WRAPPER ON)
set(ENABLE_NLS NO CACHE BOOL "" FORCE)
set(DEFAULT_VALUE_ENABLE_ASSETS ON)
set(DEFAULT_VALUE_ENABLE_AAUDIO ON)
set(DEFAULT_VALUE_ENABLE_CAMERA2 ON)
if ((NOT DEFINED CMAKE_INSTALL_PREFIX) OR CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/linphone-sdk" CACHE PATH "Default linphone-sdk installation prefix" FORCE)
endif()
......@@ -19,24 +19,28 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
lcb_add_dependent_option("Embedded OpenH264" "Embed the openh264 library instead of downloading it from Cisco." "${DEFAULT_VALUE_ENABLE_EMBEDDED_OPENH264}" "ENABLE_OPENH264" OFF)
# Define default values for the linphone builder options
set(DEFAULT_VALUE_ENABLE_ADVANCED_IM ON)
set(DEFAULT_VALUE_ENABLE_BV16 ON)
set(DEFAULT_VALUE_ENABLE_CXX_WRAPPER ON)
set(DEFAULT_VALUE_ENABLE_FFMPEG ON)
set(DEFAULT_VALUE_ENABLE_DB_STORAGE ON)
set(DEFAULT_VALUE_ENABLE_FFMPEG OFF)
set(DEFAULT_VALUE_ENABLE_G729 ${DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES})
set(DEFAULT_VALUE_ENABLE_G729B_CNG OFF)
set(DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES ON)
set(DEFAULT_VALUE_ENABLE_GSM ON)
set(DEFAULT_VALUE_ENABLE_GTK_UI OFF)
set(DEFAULT_VALUE_ENABLE_JPEG ON)
set(DEFAULT_VALUE_ENABLE_LIME_X3DH ON)
set(DEFAULT_VALUE_ENABLE_MBEDTLS ON)
set(DEFAULT_VALUE_ENABLE_MKV ON)
set(DEFAULT_VALUE_ENABLE_NLS OFF)
set(DEFAULT_VALUE_ENABLE_OPUS ON)
set(DEFAULT_VALUE_ENABLE_SPEEX ON)
set(DEFAULT_VALUE_ENABLE_SRTP ON)
set(DEFAULT_VALUE_ENABLE_TOOLS OFF)
set(DEFAULT_VALUE_ENABLE_TOOLS ON)
if(NOT LINPHONE_BUILDER_ENABLE_RPM_PACKAGING)
set(DEFAULT_VALUE_ENABLE_UNIT_TESTS ON)
endif()
......@@ -46,3 +50,8 @@ set(DEFAULT_VALUE_ENABLE_VPX ON)
set(DEFAULT_VALUE_ENABLE_WASAPI ON)
set(DEFAULT_VALUE_ENABLE_WEBRTC_AEC ON)
set(DEFAULT_VALUE_ENABLE_ZRTP ON)
set(DEFAULT_VALUE_ENABLE_ASSETS ON)
if ((NOT DEFINED CMAKE_INSTALL_PREFIX) OR CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/linphone-sdk/desktop" CACHE PATH "Default linphone-sdk installation prefix" FORCE)
endif()
......@@ -21,8 +21,12 @@
############################################################################
# Define default values for the linphone builder options
set(DEFAULT_VALUE_ENABLE_ADVANCED_IM ON)
set(DEFAULT_VALUE_ENABLE_DB_STORAGE ON)
set(DEFAULT_VALUE_ENABLE_FFMPEG OFF)
set(DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES ON)
set(DEFAULT_VALUE_ENABLE_G729 ${DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES})
set(DEFAULT_VALUE_ENABLE_G729B_CNG OFF)
set(DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES OFF)
set(DEFAULT_VALUE_ENABLE_GSM ON)
set(DEFAULT_VALUE_ENABLE_ILBC ON)
set(DEFAULT_VALUE_ENABLE_ISAC ON)
......@@ -30,15 +34,21 @@ set(DEFAULT_VALUE_ENABLE_JPEG ON)
set(DEFAULT_VALUE_ENABLE_MBEDTLS ON)
set(DEFAULT_VALUE_ENABLE_MKV ON)
set(DEFAULT_VALUE_ENABLE_OPUS ON)
set(DEFAULT_VALUE_ENABLE_QRCODE ON)
set(DEFAULT_VALUE_ENABLE_SILK OFF)
set(DEFAULT_VALUE_ENABLE_SPEEX ON)
set(DEFAULT_VALUE_ENABLE_G729 ${DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES})
set(DEFAULT_VALUE_ENABLE_G729B_CNG OFF)
set(DEFAULT_VALUE_ENABLE_LIME_X3DH ON)
set(DEFAULT_VALUE_ENABLE_SRTP ON)
set(DEFAULT_VALUE_ENABLE_UNIT_TESTS ON)
set(DEFAULT_VALUE_ENABLE_UNIT_TESTS OFF)
set(DEFAULT_VALUE_ENABLE_VCARD ON)
set(DEFAULT_VALUE_ENABLE_VIDEO ON)
set(DEFAULT_VALUE_ENABLE_VPX ON)
set(DEFAULT_VALUE_ENABLE_ZRTP ON)
set(DEFAULT_VALUE_ENABLE_TOOLS OFF)
set(DEFAULT_VALUE_ENABLE_UPDATE_CHECK ON)
set(DEFAULT_VALUE_ENABLE_ASSETS ON)
set(DEFAULT_VALUE_ENABLE_SWIFT_WRAPPER ON)
if ((NOT DEFINED CMAKE_INSTALL_PREFIX) OR CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/linphone-sdk" CACHE PATH "Default linphone-sdk installation prefix" FORCE)
endif()
############################################################################
# options-desktop.cmake
# Copyright (C) 2010-2018 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.
#
############################################################################
# Define default values for the linphone builder options
set(DEFAULT_VALUE_ENABLE_BV16 ON)
set(DEFAULT_VALUE_ENABLE_CXX_WRAPPER ON)
set(DEFAULT_VALUE_ENABLE_FFMPEG OFF)
set(DEFAULT_VALUE_ENABLE_G729 ${DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES})
set(DEFAULT_VALUE_ENABLE_G729B_CNG OFF)
set(DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES ON)
set(DEFAULT_VALUE_ENABLE_GSM ON)
set(DEFAULT_VALUE_ENABLE_GTK_UI OFF)
set(DEFAULT_VALUE_ENABLE_JPEG ON)
set(DEFAULT_VALUE_ENABLE_LIME_X3DH ON)
set(DEFAULT_VALUE_ENABLE_MBEDTLS ON)
set(DEFAULT_VALUE_ENABLE_MKV ON)
set(DEFAULT_VALUE_ENABLE_NLS OFF)
set(DEFAULT_VALUE_ENABLE_OPUS ON)
set(DEFAULT_VALUE_ENABLE_SPEEX ON)
set(DEFAULT_VALUE_ENABLE_SRTP ON)
set(DEFAULT_VALUE_ENABLE_TOOLS ON)
if(NOT LINPHONE_BUILDER_ENABLE_RPM_PACKAGING)
set(DEFAULT_VALUE_ENABLE_UNIT_TESTS ON)
endif()
set(DEFAULT_VALUE_ENABLE_VCARD ON)
set(DEFAULT_VALUE_ENABLE_VIDEO ON)
set(DEFAULT_VALUE_ENABLE_VPX ON)
set(DEFAULT_VALUE_ENABLE_WASAPI ON)
set(DEFAULT_VALUE_ENABLE_WEBRTC_AEC ON)
set(DEFAULT_VALUE_ENABLE_ZRTP ON)
#cmake detection from ms2 does not work yat
set(DEFAULT_VALUE_ENABLE_V4L OFF)
set(DEFAULT_VALUE_ENABLE_ASSETS ON)
if ((NOT DEFINED CMAKE_INSTALL_PREFIX) OR CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/linphone-sdk/raspberry" CACHE PATH "Default linphone-sdk installation prefix" FORCE)
endif()
......@@ -22,6 +22,8 @@
# Define default values for the linphone builder options
set(DEFAULT_VALUE_ENABLE_CSHARP_WRAPPER ON)
set(DEFAULT_VALUE_ENABLE_SWIFT_WRAPPER OFF)
set(DEFAULT_VALUE_ENABLE_JAZZY_DOC OFF)
set(DEFAULT_VALUE_ENABLE_FFMPEG OFF)
set(DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES ON)
set(DEFAULT_VALUE_ENABLE_G729 ${DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES})
......@@ -44,3 +46,8 @@ set(DEFAULT_VALUE_ENABLE_WEBRTC_AEC ON)
set(DEFAULT_VALUE_ENABLE_WEBRTC_AECM ON)
set(DEFAULT_VALUE_ENABLE_ZRTP ON)
set(ENABLE_NLS NO CACHE BOOL "" FORCE)
set(DEFAULT_VALUE_ENABLE_ASSETS ON)
if ((NOT DEFINED CMAKE_INSTALL_PREFIX) OR CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/linphone-sdk" CACHE PATH "Default linphone-sdk installation prefix" FORCE)
endif()
......@@ -25,10 +25,13 @@
lcb_add_option("Unit tests" "Enable unit tests support with BCUnit library." "${DEFAULT_VALUE_ENABLE_UNIT_TESTS}")
lcb_add_option("Debug logs" "Enable debug level logs in libinphone and mediastreamer2." NO)
lcb_add_option("Doc" "Enable documentation generation with Doxygen and Sphinx" NO)
lcb_add_option("SOCI" "Enable SOCI support." "${DEFAULT_VALUE_ENABLE_SOCI}")
lcb_add_option("Tools" "Enable tools binary compilation." "${DEFAULT_VALUE_ENABLE_TOOLS}")
lcb_add_option("unmaintained" "Allow inclusion of unmaintained code in the build." OFF)
lcb_add_option("Xml2" "Enable bc version of libxml2" ON)
lcb_add_option("Sqlite" "Enable bc version of sqlite3" ON)
lcb_add_option("Zlib" "Enable bc version of zlib" ON)
lcb_add_option("Soci mysql" "Enable mysql support of SOCI" OFF)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT IOS AND NOT ANDROID)
lcb_add_option("Sanitizer" "Enable Clang sanitizer" "${DEFAULT_VALUE_ENABLE_SANITIZER}")
endif()
#if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT IOS)
lcb_add_option("Sanitizer" "Enable Clang sanitizer" NO)
#endif()
......@@ -26,7 +26,8 @@ lcb_add_option("Redis" "Enable hiredis support." "${DEFAULT_VALUE_ENABLE_REDIS}"
lcb_add_option("Presence" "Enable presence server support." "${DEFAULT_VALUE_ENABLE_PRESENCE}")
lcb_add_option("Conference" "Enable conference server support." "${DEFAULT_VALUE_ENABLE_CONFERENCE}")
lcb_add_option("SNMP" "Enable SNMP support." "${DEFAULT_ENABLE_SNMP}")
lcb_add_option("Transcoder" "Enable transcoder support." "${DEFAULT_ENABLE_TRANSCODER}")
lcb_add_option("Transcoder" "Enable transcoder support." "${DEFAULT_VALUE_ENABLE_TRANSCODER}")
lcb_add_option("Protobuf" "Enable protobuf for REDIS." "${DEFAULT_ENABLE_PROTOBUF}" "ENABLE_PROTOBUF" OFF)
lcb_add_option("Jwe Auth Plugin" "Enable JweAuth plugin support." "${DEFAULT_VALUE_ENABLE_JWE_AUTH_PLUGIN}")
lcb_add_option("External Auth Plugin" "Enable ExternalAuth plugin support" "${DEFAULT_VALUE_ENABLE_EXTERNAL_AUTH_PLUGIN}")
lcb_add_option("SOCI" "Enable SOCI support." "${DEFAULT_VALUE_ENABLE_SOCI}")
......@@ -25,12 +25,17 @@
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("Swift wrapper" "Build the Swift wrapper from Liblinphone." "${DEFAULT_VALUE_ENABLE_SWIFT_WRAPPER}")