Commit 28fbeb04 authored by Ghislain MARY's avatar Ghislain MARY

Use CMAKE_TOOLCHAIN_FILE to specify toolchain and add...

Use CMAKE_TOOLCHAIN_FILE to specify toolchain and add LINPHONE_BUILDER_CONFIG_FILE option to specify the build configuration to use.
parent 484aaaea
......@@ -22,7 +22,10 @@
cmake_minimum_required(VERSION 2.8)
set(LINPHONE_BUILDER_TOOLCHAIN "desktop" CACHE STRING "Toolchain to use for the build.")
include(FeatureSummary)
set(LINPHONE_BUILDER_CONFIG_FILE "configs/config-desktop.cmake" CACHE STRING "Path to the linphone builder configuration file.")
set(LINPHONE_BUILDER_WORK_DIR "${CMAKE_CURRENT_SOURCE_DIR}/WORK" CACHE PATH "Working directory for the build.")
......@@ -31,13 +34,17 @@ include(cmake/LinphoneCMakeBuilder.cmake)
# Include toolchain definition
message("-- Using toolchain '${LINPHONE_BUILDER_TOOLCHAIN}'")
include(toolchains/toolchain-${LINPHONE_BUILDER_TOOLCHAIN}.cmake)
linphone_builder_apply_toolchain_flags()
if(CMAKE_TOOLCHAIN_FILE)
get_filename_component(CMAKE_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_FILE} ABSOLUTE)
message(STATUS "Using toolchain file '${CMAKE_TOOLCHAIN_FILE}'")
endif()
# Include project configuration according to the toolchain
include(configs/config-${LINPHONE_BUILDER_TOOLCHAIN}.cmake)
get_filename_component(LINPHONE_BUILDER_CONFIG_FILE ${LINPHONE_BUILDER_CONFIG_FILE} ABSOLUTE)
message(STATUS "Using configuration file '${LINPHONE_BUILDER_CONFIG_FILE}'")
include(${LINPHONE_BUILDER_CONFIG_FILE})
linphone_builder_apply_flags()
linphone_builder_add_external_projects()
......
......@@ -40,14 +40,14 @@ build-bb10-i486:
mkdir -p OUTPUT/liblinphone-bb10-sdk && \
mkdir -p WORK/cmake-bb10-i486 && \
cd WORK/cmake-bb10-i486 && \
cmake ../.. -DLINPHONE_BUILDER_TOOLCHAIN=bb10-i486 -DCMAKE_PREFIX_PATH=../../OUTPUT/liblinphone-bb10-sdk/i486 -DCMAKE_INSTALL_PREFIX=../../OUTPUT/liblinphone-bb10-sdk/i486 $(filter -D%,$(MAKEFLAGS)) && \
cmake ../.. -DCMAKE_TOOLCHAIN_FILE=toolchains/toolchain-bb10-i486.cmake -DLINPHONE_BUILDER_CONFIG_FILE=configs/config-bb10-i486.cmake -DCMAKE_PREFIX_PATH=../../OUTPUT/liblinphone-bb10-sdk/i486 -DCMAKE_INSTALL_PREFIX=../../OUTPUT/liblinphone-bb10-sdk/i486 $(filter -D%,$(MAKEFLAGS)) && \
make -j $(NUMCPUS)
build-bb10-arm:
mkdir -p OUTPUT/liblinphone-bb10-sdk && \
mkdir -p WORK/cmake-bb10-arm && \
cd WORK/cmake-bb10-arm && \
cmake ../.. -DLINPHONE_BUILDER_TOOLCHAIN=bb10-arm -DCMAKE_PREFIX_PATH=../../OUTPUT/liblinphone-bb10-sdk/arm -DCMAKE_INSTALL_PREFIX=../../OUTPUT/liblinphone-bb10-sdk/arm $(filter -D%,$(MAKEFLAGS)) && \
cmake ../.. -DCMAKE_TOOLCHAIN_FILE=toolchains/toolchain-bb10-arm.cmake -DLINPHONE_BUILDER_CONFIG_FILE=configs/config-bb10-arm.cmake -DCMAKE_PREFIX_PATH=../../OUTPUT/liblinphone-bb10-sdk/arm -DCMAKE_INSTALL_PREFIX=../../OUTPUT/liblinphone-bb10-sdk/arm $(filter -D%,$(MAKEFLAGS)) && \
make -j $(NUMCPUS)
build-bb10: build-bb10-i486 build-bb10-arm
......@@ -68,7 +68,7 @@ help-bb10:
mkdir -p OUTPUT/liblinphone-bb10-sdk && \
mkdir -p WORK/cmake-bb10-i486 && \
cd WORK/cmake-bb10-i486 && \
cmake ../.. -DLINPHONE_BUILDER_TOOLCHAIN=bb10-i486 -DCMAKE_PREFIX_PATH=../../OUTPUT/liblinphone-bb10-sdk/i486 -DCMAKE_INSTALL_PREFIX=../../OUTPUT/liblinphone-bb10-sdk/i486 $(filter -D%,$(MAKEFLAGS)) -LH
cmake ../.. -DCMAKE_TOOLCHAIN_FILE=toolchains/toolchain-bb10-i486.cmake -DLINPHONE_BUILDER_CONFIG_FILE=configs/config-bb10-i486.cmake -DCMAKE_PREFIX_PATH=../../OUTPUT/liblinphone-bb10-sdk/i486 -DCMAKE_INSTALL_PREFIX=../../OUTPUT/liblinphone-bb10-sdk/i486 $(filter -D%,$(MAKEFLAGS)) -LH
generate-bb10-sdk: build-bb10
cd OUTPUT && \
......@@ -78,21 +78,21 @@ build-ios-i386:
mkdir -p OUTPUT/liblinphone-ios-sdk && \
mkdir -p WORK/cmake-ios-i386 && \
cd WORK/cmake-ios-i386 && \
cmake ../.. -DLINPHONE_BUILDER_TOOLCHAIN=ios-i386 -DCMAKE_PREFIX_PATH=../../OUTPUT/liblinphone-ios-sdk/i386 -DCMAKE_INSTALL_PREFIX=../../OUTPUT/liblinphone-ios-sdk/i386 $(filter -D%,$(MAKEFLAGS)) && \
cmake ../.. -DCMAKE_TOOLCHAIN_FILE=toolchains/toolchain-ios-i386.cmake -DLINPHONE_BUILDER_CONFIG_FILE=configs/config-ios-i386.cmake -DCMAKE_PREFIX_PATH=../../OUTPUT/liblinphone-ios-sdk/i386 -DCMAKE_INSTALL_PREFIX=../../OUTPUT/liblinphone-ios-sdk/i386 $(filter -D%,$(MAKEFLAGS)) && \
make -j $(NUMCPUS)
build-ios-armv7:
mkdir -p OUTPUT/liblinphone-ios-sdk && \
mkdir -p WORK/cmake-ios-armv7 && \
cd WORK/cmake-ios-armv7 && \
cmake ../.. -DLINPHONE_BUILDER_TOOLCHAIN=ios-armv7 -DCMAKE_PREFIX_PATH=../../OUTPUT/liblinphone-ios-sdk/armv7 -DCMAKE_INSTALL_PREFIX=../../OUTPUT/liblinphone-ios-sdk/armv7 $(filter -D%,$(MAKEFLAGS)) && \
cmake ../.. -DCMAKE_TOOLCHAIN_FILE=toolchains/toolchain-ios-armv7.cmake -DLINPHONE_BUILDER_CONFIG_FILE=configs/config-ios-armv7.cmake -DCMAKE_PREFIX_PATH=../../OUTPUT/liblinphone-ios-sdk/armv7 -DCMAKE_INSTALL_PREFIX=../../OUTPUT/liblinphone-ios-sdk/armv7 $(filter -D%,$(MAKEFLAGS)) && \
make -j $(NUMCPUS)
build-ios-armv7s:
mkdir -p OUTPUT/liblinphone-ios-sdk && \
mkdir -p WORK/cmake-ios-armv7s && \
cd WORK/cmake-ios-armv7s && \
cmake ../.. -DLINPHONE_BUILDER_TOOLCHAIN=ios-armv7s -DCMAKE_PREFIX_PATH=../../OUTPUT/liblinphone-ios-sdk/armv7s -DCMAKE_INSTALL_PREFIX=../../OUTPUT/liblinphone-ios-sdk/armv7s $(filter -D%,$(MAKEFLAGS)) && \
cmake ../.. -DCMAKE_TOOLCHAIN_FILE=toolchains/toolchain-ios-armv7s.cmake -DLINPHONE_BUILDER_CONFIG_FILE=configs/config-ios-armv7s.cmake -DCMAKE_PREFIX_PATH=../../OUTPUT/liblinphone-ios-sdk/armv7s -DCMAKE_INSTALL_PREFIX=../../OUTPUT/liblinphone-ios-sdk/armv7s $(filter -D%,$(MAKEFLAGS)) && \
make -j $(NUMCPUS)
build-ios: build-ios-i386 build-ios-armv7 build-ios-armv7s
......@@ -118,7 +118,7 @@ help-ios:
mkdir -p OUTPUT/liblinphone-ios-sdk && \
mkdir -p WORK/cmake-ios-i386 && \
cd WORK/cmake-ios-i386 && \
cmake ../.. -DLINPHONE_BUILDER_TOOLCHAIN=ios-i386 -DCMAKE_PREFIX_PATH=../../OUTPUT/liblinphone-ios-sdk/i386 -DCMAKE_INSTALL_PREFIX=../../OUTPUT/liblinphone-ios-sdk/i386 $(filter -D%,$(MAKEFLAGS)) -LH
cmake ../.. -DCMAKE_TOOLCHAIN_FILE=toolchains/toolchain-ios-i386.cmake -DLINPHONE_BUILDER_CONFIG_FILE=configs/config-ios-i386.cmake -DCMAKE_PREFIX_PATH=../../OUTPUT/liblinphone-ios-sdk/i386 -DCMAKE_INSTALL_PREFIX=../../OUTPUT/liblinphone-ios-sdk/i386 $(filter -D%,$(MAKEFLAGS)) -LH
generate-ios-sdk: build-ios
arm_archives=`find OUTPUT/liblinphone-ios-sdk/armv7 -name *.a` && \
......@@ -151,4 +151,3 @@ generate-ios-sdk: build-ios
veryclean:
rm -rf WORK && \
rm -rf OUTPUT
......@@ -101,6 +101,6 @@ list(APPEND LINPHONE_BUILDER_BUILDERS linphone)
# Include builders
foreach(BUILDER ${LINPHONE_BUILDER_BUILDERS})
message("-- Including builder ${BUILDER}")
message(STATUS "Including builder ${BUILDER}")
include(${CMAKE_CURRENT_SOURCE_DIR}/builders/${BUILDER}.cmake)
endforeach(BUILDER)
......@@ -26,7 +26,7 @@ set(EP_bcg729_BUILD_METHOD "autotools")
set(EP_bcg729_USE_AUTOGEN "yes")
set(EP_bcg729_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_TOOLCHAIN_HOST}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_bcg729_LINKING_TYPE "--disable-static" "--enable-shared")
set(EP_bcg729_DEPENDENCIES EP_ms2)
......
......@@ -26,7 +26,7 @@ set(EP_libilbcrfc3951_BUILD_METHOD "autotools")
set(EP_libilbcrfc3951_USE_AUTOGEN "yes")
set(EP_libilbcrfc3951_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_TOOLCHAIN_HOST}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_libilbcrfc3951_LINKING_TYPE "--disable-static" "--enable-shared")
......@@ -32,7 +32,7 @@ else(WIN32)
set(EP_linphone_USE_AUTOGEN "yes")
set(EP_linphone_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_TOOLCHAIN_HOST}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_linphone_CONFIGURE_OPTIONS
"--disable-strict"
......
......@@ -33,7 +33,7 @@ else(WIN32)
set(EP_ms2_CONFIG_H_FILE mediastreamer-config.h)
set(EP_ms2_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_TOOLCHAIN_HOST}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_ms2_CONFIGURE_OPTIONS
"--disable-strict"
......
......@@ -27,7 +27,7 @@ set(EP_msamr_USE_AUTOGEN "yes")
set(EP_msamr_CONFIGURE_OPTIONS )
set(EP_msamr_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_TOOLCHAIN_HOST}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_msamr_LINKING_TYPE "--disable-static" "--enable-shared")
set(EP_msamr_DEPENDENCIES EP_ms2 EP_opencoreamr)
......
......@@ -26,7 +26,7 @@ set(EP_msilbc_BUILD_METHOD "autotools")
set(EP_msilbc_USE_AUTOGEN "yes")
set(EP_msilbc_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_TOOLCHAIN_HOST}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_msilbc_LINKING_TYPE "--disable-static" "--enable-shared")
set(EP_msilbc_DEPENDENCIES EP_ms2 EP_libilbcrfc3951)
......
......@@ -26,7 +26,7 @@ set(EP_msisac_BUILD_METHOD "autotools")
set(EP_msisac_USE_AUTOGEN "yes")
set(EP_msisac_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_TOOLCHAIN_HOST}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_msisac_LINKING_TYPE "--disable-static" "--enable-shared")
set(EP_msisac_DEPENDENCIES EP_ms2)
......
......@@ -26,7 +26,7 @@ set(EP_mssilk_BUILD_METHOD "autotools")
set(EP_mssilk_USE_AUTOGEN "yes")
set(EP_mssilk_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_TOOLCHAIN_HOST}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_mssilk_LINKING_TYPE "--disable-static" "--enable-shared")
set(EP_mssilk_DEPENDENCIES EP_ms2)
......
......@@ -26,7 +26,7 @@ set(EP_msx264_BUILD_METHOD "autotools")
set(EP_msx264_USE_AUTOGEN "yes")
set(EP_msx264_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_TOOLCHAIN_HOST}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_msx264_LINKING_TYPE "--disable-static" "--enable-shared")
set(EP_msx264_DEPENDENCIES EP_ms2 EP_x264)
......@@ -26,7 +26,7 @@ set(EP_opencoreamr_USE_AUTOGEN "yes")
set(EP_opencoreamr_CONFIGURE_OPTIONS )
set(EP_opencoreamr_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_TOOLCHAIN_HOST}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_opencoreamr_LINKING_TYPE "--disable-static" "--enable-shared")
......
#!/bin/sh
export CC=@LINPHONE_BUILDER_TOOLCHAIN_CC@
export CXX=@LINPHONE_BUILDER_TOOLCHAIN_CXX@
export OBJC=@LINPHONE_BUILDER_TOOLCHAIN_OBJC@
export LD=@LINPHONE_BUILDER_TOOLCHAIN_LD@
export AR=@LINPHONE_BUILDER_TOOLCHAIN_AR@
export RANLIB=@LINPHONE_BUILDER_TOOLCHAIN_RANLIB@
export STRIP=@LINPHONE_BUILDER_TOOLCHAIN_STRIP@
export NM=@LINPHONE_BUILDER_TOOLCHAIN_NM@
export CC=@CMAKE_C_COMPILER@
export CXX=@CMAKE_CXX_COMPILER@
export OBJC=@CMAKE_C_COMPILER@
export LD=@CMAKE_LINKER@
export AR=@CMAKE_AR@
export RANLIB=@CMAKE_RANLIB@
export STRIP=@CMAKE_STRIP@
export NM=@CMAKE_NM@
export ASFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_ASFLAGS@"
export CPPFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_CPPFLAGS@"
export CFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_CFLAGS@"
export CPPFLAGS="@LINPHONE_BUILDER_CPPFLAGS@"
export CFLAGS="@LINPHONE_BUILDER_CFLAGS@"
export CXXFLAGS="@LINPHONE_BUILD_TOOLCHAIN_CXXFLAGS@"
export OBJCFLAGS="@LINPHONE_BUILD_TOOLCHAIN_OBJCFLAGS@"
export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@"
export LDFLAGS="@LINPHONE_BUILDER_LDFLAGS@"
export PKG_CONFIG="@LINPHONE_BUILDER_PKG_CONFIG@"
export PKG_CONFIG_PATH="@LINPHONE_BUILDER_PKG_CONFIG_PATH@"
......
#!/bin/sh
export CC=@LINPHONE_BUILDER_TOOLCHAIN_CC@
export CXX=@LINPHONE_BUILDER_TOOLCHAIN_CXX@
export OBJC=@LINPHONE_BUILDER_TOOLCHAIN_OBJC@
export LD=@LINPHONE_BUILDER_TOOLCHAIN_LD@
export AR=@LINPHONE_BUILDER_TOOLCHAIN_AR@
export RANLIB=@LINPHONE_BUILDER_TOOLCHAIN_RANLIB@
export STRIP=@LINPHONE_BUILDER_TOOLCHAIN_STRIP@
export NM=@LINPHONE_BUILDER_TOOLCHAIN_NM@
export CC=@CMAKE_C_COMPILER@
export CXX=@CMAKE_CXX_COMPILER@
export OBJC=@CMAKE_C_COMPILER@
export LD=@CMAKE_LINKER@
export AR=@CMAKE_AR@
export RANLIB=@CMAKE_RANLIB@
export STRIP=@CMAKE_STRIP@
export NM=@CMAKE_NM@
export ASFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_ASFLAGS@"
export CPPFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_CPPFLAGS@"
export CFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_CFLAGS@"
export CPPFLAGS="@LINPHONE_BUILDER_CPPFLAGS@"
export CFLAGS="@LINPHONE_BUILDER_CFLAGS@"
export CXXFLAGS="@LINPHONE_BUILD_TOOLCHAIN_CXXFLAGS@"
export OBJCFLAGS="@LINPHONE_BUILD_TOOLCHAIN_OBJCFLAGS@"
export LDFLAGS="@LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@"
export LDFLAGS="@LINPHONE_BUILDER_LDFLAGS@"
export PKG_CONFIG="@LINPHONE_BUILDER_PKG_CONFIG@"
export PKG_CONFIG_PATH="@LINPHONE_BUILDER_PKG_CONFIG_PATH@"
......
......@@ -25,7 +25,7 @@ set(EP_opus_BUILD_METHOD "autotools")
set(EP_opus_USE_AUTOGEN "yes")
set(EP_opus_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_TOOLCHAIN_HOST}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_opus_CONFIGURE_OPTIONS
"--disable-doc"
......
......@@ -33,7 +33,7 @@ else(WIN32)
set(EP_ortp_CONFIG_H_FILE ortp-config.h)
set(EP_ortp_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_TOOLCHAIN_HOST}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_ortp_CONFIGURE_OPTIONS
"--disable-strict"
......
......@@ -26,7 +26,7 @@ set(EP_tunnel_BUILD_METHOD "autotools")
set(EP_tunnel_USE_AUTOGEN "yes")
set(EP_tunnel_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_TOOLCHAIN_HOST}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_tunnel_CONFIGURE_OPTIONS
"--disable-servers"
......
......@@ -24,7 +24,7 @@ set(EP_v4l_URL "http://linuxtv.org/downloads/v4l-utils/v4l-utils-1.0.0.tar.bz2")
set(EP_v4l_BUILD_METHOD "autotools")
set(EP_v4l_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_TOOLCHAIN_HOST}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_v4l_CONFIGURE_OPTIONS
"--disable-v4l-utils"
......
......@@ -25,7 +25,7 @@ set(EP_voamrwbenc_BUILD_METHOD "autotools")
set(EP_voamrwbenc_USE_AUTOGEN "yes")
set(EP_voamrwbenc_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_TOOLCHAIN_HOST}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_voamrwbenc_LINKING_TYPE "--disable-static" "--enable-shared")
set(EP_voamrwbenc_PATCH_COMMAND "${CMAKE_COMMAND}" "-E" "copy" "${CMAKE_CURRENT_SOURCE_DIR}/builders/voamrwbenc/autogen.sh" "<SOURCE_DIR>")
......
......@@ -25,11 +25,11 @@ set(EP_x264_GIT_TAG "f6a8615ab0c922ac2cb5c82c9824f6f4742b1725")
set(EP_x264_BUILD_METHOD "autotools")
set(EP_x264_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_TOOLCHAIN_HOST}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_x264_CONFIGURE_OPTIONS
"--extra-cflags=${LINPHONE_BUILDER_TOOLCHAIN_CFLAGS}"
"--extra-ldflags=${LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS}"
"--extra-cflags=${LINPHONE_BUILDER_CFLAGS}"
"--extra-ldflags=${LINPHONE_BUILDER_LDFLAGS}"
)
set(EP_x264_LINKING_TYPE "--enable-shared")
set(EP_x264_CONFIGURE_ENV "CC=$CC")
......
......@@ -27,7 +27,7 @@ set(EP_xml2_USE_AUTOGEN "yes")
set(EP_xml2_CONFIGURE_OPTIONS_PASSED_TO_AUTOGEN "yes")
set(EP_xml2_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_TOOLCHAIN_HOST}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_xml2_CONFIGURE_OPTIONS
"--with-minimum"
......
......@@ -78,24 +78,11 @@ list(APPEND LINPHONE_BUILDER_EP_VARS
CMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH
CMAKE_BUILD_TYPE:STRING
CMAKE_BUNDLE_OUTPUT_DIRECTORY:PATH
CMAKE_C_COMPILER:PATH
CMAKE_C_COMPILER_FORCED:BOOL
CMAKE_C_COMPILER_ID_RUN:BOOL
CMAKE_C_COMPILER_ID:STRING
CMAKE_C_COMPILER_VERSION:STRING
CMAKE_C_FLAGS_DEBUG:STRING
CMAKE_C_FLAGS_MINSIZEREL:STRING
CMAKE_C_FLAGS_RELEASE:STRING
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING
CMAKE_C_FLAGS:STRING
CMAKE_COMPILER_IS_GNUCC:BOOL
CMAKE_COMPILER_IS_GNUCXX:BOOL
CMAKE_CROSSCOMPILING:BOOL
CMAKE_CXX_COMPILER:PATH
CMAKE_CXX_COMPILER_FORCED:BOOL
CMAKE_CXX_COMPILER_ID_RUN:BOOL
CMAKE_CXX_COMPILER_ID:STRING
CMAKE_CXX_COMPILER_VERSION:STRING
CMAKE_CXX_FLAGS_DEBUG:STRING
CMAKE_CXX_FLAGS_MINSIZEREL:STRING
CMAKE_CXX_FLAGS_RELEASE:STRING
......@@ -107,10 +94,6 @@ list(APPEND LINPHONE_BUILDER_EP_VARS
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING
CMAKE_EXE_LINKER_FLAGS:STRING
CMAKE_EXTRA_GENERATOR:STRING
CMAKE_FIND_ROOT_PATH:PATH
CMAKE_FIND_ROOT_PATH_MODE_INCLUDE:STRING
CMAKE_FIND_ROOT_PATH_MODE_LIBRARY:STRING
CMAKE_FIND_ROOT_PATH_MODE_PROGRAM:STRING
CMAKE_INSTALL_PREFIX:PATH
CMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING
......@@ -128,10 +111,7 @@ list(APPEND LINPHONE_BUILDER_EP_VARS
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING
CMAKE_SHARED_LINKER_FLAGS:STRING
CMAKE_SKIP_RPATH:BOOL
CMAKE_SYSTEM_NAME:STRING
CMAKE_SYSTEM_PROCESSOR:STRING
CMAKE_VERBOSE_MAKEFILE:BOOL
LINPHONE_BUILDER_TOOLCHAIN:STRING
MSVC_C_ARCHITECTURE_ID:STRING
MSVC_CXX_ARCHITECTURE_ID:STRING
MSVC_VERSION:STRING
......@@ -142,31 +122,34 @@ if(APPLE)
CMAKE_OSX_DEPLOYMENT_TARGET:STRING
)
endif(APPLE)
if(CMAKE_TOOLCHAIN_FILE)
list(APPEND LINPHONE_BUILDER_EP_VARS CMAKE_TOOLCHAIN_FILE:PATH)
endif()
macro(linphone_builder_apply_toolchain_flags)
macro(linphone_builder_apply_flags)
foreach(BUILD_CONFIG "" "_DEBUG" "_MINSIZEREL" "_RELEASE" "_RELWITHDEBINFO")
if(NOT "${LINPHONE_BUILDER_TOOLCHAIN_CPPFLAGS}" STREQUAL "")
set(CMAKE_C_FLAGS${BUILD_CONFIG} "${CMAKE_C_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_TOOLCHAIN_CPPFLAGS}")
set(CMAKE_CXX_FLAGS${BUILD_CONFIG} "${CMAKE_CXX_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_TOOLCHAIN_CPPFLAGS}")
endif(NOT "${LINPHONE_BUILDER_TOOLCHAIN_CPPFLAGS}" STREQUAL "")
if(NOT "${LINPHONE_BUILDER_TOOLCHAIN_CFLAGS}" STREQUAL "")
set(CMAKE_C_FLAGS${BUILD_CONFIG} "${CMAKE_C_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_TOOLCHAIN_CFLAGS}")
endif(NOT "${LINPHONE_BUILDER_TOOLCHAIN_CFLAGS}" STREQUAL "")
if(NOT "${LINPHONE_BUILDER_TOOLCHAIN_CXXFLAGS}" STREQUAL "")
set(CMAKE_CXX_FLAGS${BUILD_CONFIG} "${CMAKE_CXX_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_TOOLCHAIN_CXXFLAGS}")
endif(NOT "${LINPHONE_BUILDER_TOOLCHAIN_CXXFLAGS}" STREQUAL "")
if(NOT "${LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS}" STREQUAL "")
if(NOT "${LINPHONE_BUILDER_CPPFLAGS}" STREQUAL "")
set(CMAKE_C_FLAGS${BUILD_CONFIG} "${CMAKE_C_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CPPFLAGS}")
set(CMAKE_CXX_FLAGS${BUILD_CONFIG} "${CMAKE_CXX_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CPPFLAGS}")
endif(NOT "${LINPHONE_BUILDER_CPPFLAGS}" STREQUAL "")
if(NOT "${LINPHONE_BUILDER_CFLAGS}" STREQUAL "")
set(CMAKE_C_FLAGS${BUILD_CONFIG} "${CMAKE_C_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CFLAGS}")
endif(NOT "${LINPHONE_BUILDER_CFLAGS}" STREQUAL "")
if(NOT "${LINPHONE_BUILDER_CXXFLAGS}" STREQUAL "")
set(CMAKE_CXX_FLAGS${BUILD_CONFIG} "${CMAKE_CXX_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CXXFLAGS}")
endif(NOT "${LINPHONE_BUILDER_CXXFLAGS}" STREQUAL "")
if(NOT "${LINPHONE_BUILDER_LDFLAGS}" STREQUAL "")
# TODO: The two following lines should not be here
set(CMAKE_C_FLAGS${BUILD_CONFIG} "${CMAKE_C_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS}")
set(CMAKE_CXX_FLAGS${BUILD_CONFIG} "${CMAKE_CXX_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS}")
set(CMAKE_C_FLAGS${BUILD_CONFIG} "${CMAKE_C_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_LDFLAGS}")
set(CMAKE_CXX_FLAGS${BUILD_CONFIG} "${CMAKE_CXX_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_LDFLAGS}")
set(CMAKE_EXE_LINKER_FLAGS${BUILD_CONFIG} "${CMAKE_EXE_LINKER_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS${BUILD_CONFIG} "${CMAKE_MODULE_LINKER_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS${BUILD_CONFIG} "${CMAKE_SHARED_LINKER_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS}")
endif(NOT "${LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS}" STREQUAL "")
set(CMAKE_EXE_LINKER_FLAGS${BUILD_CONFIG} "${CMAKE_EXE_LINKER_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_LDFLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS${BUILD_CONFIG} "${CMAKE_MODULE_LINKER_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_LDFLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS${BUILD_CONFIG} "${CMAKE_SHARED_LINKER_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_LDFLAGS}")
endif(NOT "${LINPHONE_BUILDER_LDFLAGS}" STREQUAL "")
endforeach(BUILD_CONFIG)
endmacro(linphone_builder_apply_toolchain_flags)
endmacro(linphone_builder_apply_flags)
macro(linphone_builder_apply_cmake_flags_to_autotools_project PROJNAME)
......@@ -215,13 +198,16 @@ endmacro(linphone_builder_apply_extra_flags)
macro(linphone_builder_set_ep_directories PROJNAME)
get_filename_component(CONFIG_NAME ${LINPHONE_BUILDER_CONFIG_FILE} NAME_WE)
string(REGEX REPLACE "config-" "" CONFIG_NAME ${CONFIG_NAME})
set(ep_source "${ep_base}/Source/EP_${PROJNAME}")
set(ep_tmp "${ep_base}/tmp-${LINPHONE_BUILDER_TOOLCHAIN}/${PROJNAME}")
set(ep_tmp "${ep_base}/tmp-${CONFIG_NAME}/${PROJNAME}")
if("${EP_${PROJNAME}_BUILD_IN_SOURCE}" STREQUAL "yes")
set(ep_build "${ep_source}")
else("${EP_${PROJNAME}_BUILD_IN_SOURCE}" STREQUAL "yes")
set(ep_build "${ep_base}/Build-${LINPHONE_BUILDER_TOOLCHAIN}/${PROJNAME}")
set(ep_build "${ep_base}/Build-${CONFIG_NAME}/${PROJNAME}")
endif("${EP_${PROJNAME}_BUILD_IN_SOURCE}" STREQUAL "yes")
unset(CONFIG_NAME)
endmacro(linphone_builder_set_ep_directories)
......
#!/bin/sh
export CC=@LINPHONE_BUILDER_TOOLCHAIN_CC@
export CXX=@LINPHONE_BUILDER_TOOLCHAIN_CXX@
export OBJC=@LINPHONE_BUILDER_TOOLCHAIN_OBJC@
export LD=@LINPHONE_BUILDER_TOOLCHAIN_LD@
export AR=@LINPHONE_BUILDER_TOOLCHAIN_AR@
export RANLIB=@LINPHONE_BUILDER_TOOLCHAIN_RANLIB@
export STRIP=@LINPHONE_BUILDER_TOOLCHAIN_STRIP@
export NM=@LINPHONE_BUILDER_TOOLCHAIN_NM@
export CC=@CMAKE_C_COMPILER@
export CXX=@CMAKE_CXX_COMPILER@
export OBJC=@CMAKE_C_COMPILER@
export LD=@CMAKE_LINKER@
export AR=@CMAKE_AR@
export RANLIB=@CMAKE_RANLIB@
export STRIP=@CMAKE_STRIP@
export NM=@CMAKE_NM@
export ASFLAGS="@ep_asflags@ @LINPHONE_BUILDER_TOOLCHAIN_ASFLAGS@ @ep_extra_asflags@"
export CPPFLAGS="@ep_cppflags@ @LINPHONE_BUILDER_TOOLCHAIN_CPPFLAGS@ @ep_extra_cppflags@"
export CFLAGS="@ep_cflags@ @LINPHONE_BUILDER_TOOLCHAIN_CFLAGS@ @ep_extra_cflags@"
export CPPFLAGS="@ep_cppflags@ @LINPHONE_BUILDER_CPPFLAGS@ @ep_extra_cppflags@"
export CFLAGS="@ep_cflags@ @LINPHONE_BUILDER_CFLAGS@ @ep_extra_cflags@"
export CXXFLAGS="@ep_cxxflags@ @LINPHONE_BUILD_TOOLCHAIN_CXXFLAGS@ @ep_extra_cxxflags@"
export OBJCFLAGS="@ep_objcflags@ @LINPHONE_BUILD_TOOLCHAIN_OBJCFLAGS@ @ep_extra_objcflags@"
export LDFLAGS="@ep_ldflags@ @LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @ep_extra_ldflags@"
export LDFLAGS="@ep_ldflags@ @LINPHONE_BUILDER_LDFLAGS@ @ep_extra_ldflags@"
export PKG_CONFIG="@LINPHONE_BUILDER_PKG_CONFIG@"
export PKG_CONFIG_PATH="@LINPHONE_BUILDER_PKG_CONFIG_PATH@"
......
#!/bin/sh
export CC=@LINPHONE_BUILDER_TOOLCHAIN_CC@
export CXX=@LINPHONE_BUILDER_TOOLCHAIN_CXX@
export OBJC=@LINPHONE_BUILDER_TOOLCHAIN_OBJC@
export LD=@LINPHONE_BUILDER_TOOLCHAIN_LD@
export AR=@LINPHONE_BUILDER_TOOLCHAIN_AR@
export RANLIB=@LINPHONE_BUILDER_TOOLCHAIN_RANLIB@
export STRIP=@LINPHONE_BUILDER_TOOLCHAIN_STRIP@
export NM=@LINPHONE_BUILDER_TOOLCHAIN_NM@
export CC=@CMAKE_C_COMPILER@
export CXX=@CMAKE_CXX_COMPILER@
export OBJC=@CMAKE_C_COMPILER@
export LD=@CMAKE_LINKER@
export AR=@CMAKE_AR@
export RANLIB=@CMAKE_RANLIB@
export STRIP=@CMAKE_STRIP@
export NM=@CMAKE_NM@
export ASFLAGS="@ep_asflags@ @LINPHONE_BUILDER_TOOLCHAIN_ASFLAGS@ @ep_extra_asflags@"
export CPPFLAGS="@ep_cppflags@ @LINPHONE_BUILDER_TOOLCHAIN_CPPFLAGS@ @ep_extra_cppflags@"
export CFLAGS="@ep_cflags@ @LINPHONE_BUILDER_TOOLCHAIN_CFLAGS@ @ep_extra_cflags@"
export CPPFLAGS="@ep_cppflags@ @LINPHONE_BUILDER_CPPFLAGS@ @ep_extra_cppflags@"
export CFLAGS="@ep_cflags@ @LINPHONE_BUILDER_CFLAGS@ @ep_extra_cflags@"
export CXXFLAGS="@ep_cxxflags@ @LINPHONE_BUILD_TOOLCHAIN_CXXFLAGS@ @ep_extra_cxxflags@"
export OBJCFLAGS="@ep_objcflags@ @LINPHONE_BUILD_TOOLCHAIN_OBJCFLAGS@ @ep_extra_objcflags@"
export LDFLAGS="@ep_ldflags@ @LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @ep_extra_ldflags@"
export LDFLAGS="@ep_ldflags@ @LINPHONE_BUILDER_LDFLAGS@ @ep_extra_ldflags@"
export PKG_CONFIG="@LINPHONE_BUILDER_PKG_CONFIG@"
export PKG_CONFIG_PATH="@LINPHONE_BUILDER_PKG_CONFIG_PATH@"
......
#!/bin/sh
export CC=@LINPHONE_BUILDER_TOOLCHAIN_CC@
export CXX=@LINPHONE_BUILDER_TOOLCHAIN_CXX@
export OBJC=@LINPHONE_BUILDER_TOOLCHAIN_OBJC@
export LD=@LINPHONE_BUILDER_TOOLCHAIN_LD@
export AR=@LINPHONE_BUILDER_TOOLCHAIN_AR@
export RANLIB=@LINPHONE_BUILDER_TOOLCHAIN_RANLIB@
export STRIP=@LINPHONE_BUILDER_TOOLCHAIN_STRIP@
export NM=@LINPHONE_BUILDER_TOOLCHAIN_NM@
export CC=@CMAKE_C_COMPILER@
export CXX=@CMAKE_CXX_COMPILER@
export OBJC=@CMAKE_C_COMPILER@
export LD=@CMAKE_LINKER@
export AR=@CMAKE_AR@
export RANLIB=@CMAKE_RANLIB@
export STRIP=@CMAKE_STRIP@
export NM=@CMAKE_NM@
export ASFLAGS="@ep_asflags@ @LINPHONE_BUILDER_TOOLCHAIN_ASFLAGS@ @ep_extra_asflags@"
export CPPFLAGS="@ep_cppflags@ @LINPHONE_BUILDER_TOOLCHAIN_CPPFLAGS@ @ep_extra_cppflags@"
export CFLAGS="@ep_cflags@ @LINPHONE_BUILDER_TOOLCHAIN_CFLAGS@ @ep_extra_cflags@"
export CPPFLAGS="@ep_cppflags@ @LINPHONE_BUILDER_CPPFLAGS@ @ep_extra_cppflags@"
export CFLAGS="@ep_cflags@ @LINPHONE_BUILDER_CFLAGS@ @ep_extra_cflags@"
export CXXFLAGS="@ep_cxxflags@ @LINPHONE_BUILD_TOOLCHAIN_CXXFLAGS@ @ep_extra_cxxflags@"
export OBJCFLAGS="@ep_objcflags@ @LINPHONE_BUILD_TOOLCHAIN_OBJCFLAGS@ @ep_extra_objcflags@"
export LDFLAGS="@ep_ldflags@ @LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS@ @ep_extra_ldflags@"
export LDFLAGS="@ep_ldflags@ @LINPHONE_BUILDER_LDFLAGS@ @ep_extra_ldflags@"
export PKG_CONFIG="@LINPHONE_BUILDER_PKG_CONFIG@"
export PKG_CONFIG_PATH="@LINPHONE_BUILDER_PKG_CONFIG_PATH@"
......
......@@ -23,6 +23,10 @@
include(configs/config-bb10.cmake)
# Global configuration
set(LINPHONE_BUILDER_CFLAGS "${LINPHONE_BUILDER_CFLAGS} -march=armv7-a -mfpu=neon")
# speex
list(APPEND EP_speex_CMAKE_OPTIONS
"-DENABLE_FLOAT_API=0"
......
......@@ -45,6 +45,16 @@ set(DEFAULT_VALUE_ENABLE_TUNNEL OFF)
set(DEFAULT_VALUE_ENABLE_UNIT_TESTS ON)
# Global configuration
get_filename_component(COMPILER_NAME ${CMAKE_C_COMPILER} NAME)
string(REGEX REPLACE "-gcc$" "" LINPHONE_BUILDER_HOST ${COMPILER_NAME})
unset(COMPILER_NAME)
set(LINPHONE_BUILDER_CPPFLAGS "-D_REENTRANT -D__QNXNTO__ -Dasm=__asm")
set(LINPHONE_BUILDER_CFLAGS "-fPIC -fstack-protector-strong")
set(LINPHONE_BUILDER_LDFLAGS "-L${QNX_TARGET}/x86/lib -Wl,-z,relro -Wl,-z,now -pie -lbps -lsocket -lslog2")
set(LINPHONE_BUILDER_PKG_CONFIG_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig) # Restrict pkg-config to search in the install directory
# Include builders
include(builders/CMakeLists.txt)
......
......@@ -45,6 +45,22 @@ set(DEFAULT_VALUE_ENABLE_TUNNEL OFF)
set(DEFAULT_VALUE_ENABLE_UNIT_TESTS ON)
# Global configuration
set(LINPHONE_BUILDER_HOST "")
if(APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.6")
set(CMAKE_OSX_ARCHITECTURES "i386")
set(LINPHONE_BUILDER_HOST "i686-apple-darwin")
set(LINPHONE_BUILDER_CPPFLAGS "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
set(LINPHONE_BUILDER_CFLAGS "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
set(LINPHONE_BUILDER_LDFLAGS "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
endif(APPLE)
if(UNIX)
# Adjust PKG_CONFIG_PATH to include install directory
set(LINPHONE_BUILDER_PKG_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/:$ENV{PKG_CONFIG_PATH}:/usr/lib/pkgconfig/:/usr/lib/x86_64-linux-gnu/pkgconfig/:/usr/share/pkgconfig/:/usr/local/lib/pkgconfig/:/opt/local/lib/pkgconfig/")
endif(UNIX)
# Include builders
include(builders/CMakeLists.txt)
......
......@@ -20,9 +20,14 @@
#
############################################################################
set(PLATFORM "OS")
include(configs/config-ios.cmake)
# Global configuration
set(LINPHONE_BUILDER_CPPFLAGS "${LINPHONE_BUILDER_CPPFLAGS} -mcpu=cortex-a8")
# speex
list(APPEND EP_speex_CMAKE_OPTIONS
"-DENABLE_FLOAT_API=0"
......
......@@ -20,6 +20,7 @@
#
############################################################################
set(PLATFORM "OS")
include(configs/config-ios.cmake)
......
......@@ -20,4 +20,5 @@
#
############################################################################
set(PLATFORM "Simulator")
include(configs/config-ios.cmake)
......@@ -45,6 +45,29 @@ set(DEFAULT_VALUE_ENABLE_TUNNEL OFF)
set(DEFAULT_VALUE_ENABLE_UNIT_TESTS ON)
# Global configuration
set(SDK_VERSION 4.0)
get_filename_component(COMPILER_NAME ${CMAKE_C_COMPILER} NAME)
string(REGEX REPLACE "-clang$" "" LINPHONE_BUILDER_HOST ${COMPILER_NAME})
unset(COMPILER_NAME)
if("${PLATFORM}" MATCHES "Simulator")
set(CLANG_TARGET_SPECIFIER "ios-simulator-version-min")
else("${PLATFORM}" MATCHES "Simulator")
set(CLANG_TARGET_SPECIFIER "iphoneos-version-min")
endif("${PLATFORM}" MATCHES "Simulator")
list(get CMAKE_FIND_ROOT_PATH 0 SYSROOT_PATH)
set(COMMON_FLAGS "-arch ${CMAKE_SYSTEM_PROCESSOR} -isysroot ${SYSROOT_PATH} -m${CLANG_TARGET_SPECIFIER}=${SDK_VERSION} -DTARGET_OS_IPHONE=1 -D__IOS -fms-extensions")
set(LINPHONE_BUILDER_TOOLCHAIN_CPPFLAGS "${COMMON_FLAGS} -Dasm=__asm")
set(LINPHONE_BUILDER_TOOLCHAIN_CFLAGS "-std=c99")
set(LINPHONE_BUILDER_TOOLCHAIN_OBJCFLAGS "-std=c99 ${COMMON_FLAGS} -x objective-c -fexceptions -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch")
set(LINPHONE_BUILDER_TOOLCHAIN_LDFLAGS "${COMMON_FLAGS}")
set(LINPHONE_BUILDER_PKG_CONFIG_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig) # Restrict pkg-config to search in the install directory
unset(COMMON_FLAGS)
unset(CLANG_TARGET_SPECIFIER)
unset(SYSROOT_PATH)
unset(SDK_VERSION)
# Include builders
include(builders/CMakeLists.txt)
......
......@@ -45,6 +45,26 @@ set(DEFAULT_VALUE_ENABLE_TUNNEL OFF)
set(DEFAULT_VALUE_ENABLE_UNIT_TESTS OFF)
# Global configuration
set(LINPHONE_BUILDER_PKG_CONFIG_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig) # Restrict pkg-config to search in the install directory
if (UNIX)
if(APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.6")
set(CMAKE_OSX_ARCHITECTURES "i386")
set(LINPHONE_BUILDER_HOST "i686-apple-darwin")
set(LINPHONE_BUILDER_CPPFLAGS "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
set(LINPHONE_BUILDER_CFLAGS "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
set(LINPHONE_BUILDER_LDFLAGS "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
else()
set(BUILD_V4L "yes")
endif()
endif()
if(WIN32)
set(LINPHONE_BUILDER_CPPFLAGS "-D_WIN32_WINNT=0x0501 -D_ALLOW_KEYWORD_MACROS")
endif()
# Include builders
include(builders/CMakeLists.txt)
......
#!/bin/bash
source @BBNDK_ENV_SCRIPT@ && @LINPHONE_BUILDER_TOOLCHAIN_PATH@-@TOOLNAME@ $*
source @BBNDK_ENV_SCRIPT@ && @BB10_TOOLCHAIN_PATH@-@TOOLNAME@ $*
......@@ -35,12 +35,12 @@ if("${BBNDK_ENV_SCRIPT}" STREQUAL "")
message(FATAL_ERROR "Could not find the bbndk environment setup script. Please make sure you installed the BlackBerry 10 native SDK.")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/toolchains/bb10/get_qnx_host.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/get_qnx_host.sh)
configure_file(${CMAKE_CURRENT_LIST_DIR}/get_qnx_host.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/get_qnx_host.sh)
execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/get_qnx_host.sh
OUTPUT_VARIABLE QNX_HOST
OUTPUT_STRIP_TRAILING_WHITESPACE
)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/toolchains/bb10/get_qnx_target.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/get_qnx_target.sh)
configure_file(${CMAKE_CURRENT_LIST_DIR}/get_qnx_target.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/get_qnx_target.sh)
execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/get_qnx_target.sh
OUTPUT_VARIABLE QNX_TARGET
OUTPUT_STRIP_TRAILING_WHITESPACE
......@@ -52,24 +52,20 @@ if("${COMPILER_PATH}" STREQUAL "")