Commit c8bf23f4 authored by Erwan Croze's avatar Erwan Croze 👋🏻

Merge branch 'master' of git.linphone.org:linphone-cmake-builder

parents 4e6e419e d892c1c3
# cunit-to-junit
# bcunit-to-junit
Convert CUnit xml test report to JUnit schema and make it easy to integrate with Jenkins CI xUnit plugin
Convert BCUnit xml test report to JUnit schema and make it easy to integrate with Jenkins CI xUnit plugin
--
## Purpose
[CUnit](http://cunit.sourceforge.net/) is a uniting framework written in pure C. Like other xUnit framework, CUnit can generate xml test reports. This XSL is able to convert CUnit xml report to popular JUnit schema and makes it easy to integrate CUnit with [Jenkin CI](http://jenkins-ci.org/).
[BCUnit](https://github.com/BelledonneCommunications/bcunit/) is a uniting framework written in pure C. Like other xUnit framework, BCUnit can generate xml test reports. This XSL is able to convert BCUnit xml report to popular JUnit schema and makes it easy to integrate BCUnit with [Jenkin CI](http://jenkins-ci.org/).
## Use with Jenkins CI
......@@ -14,8 +14,8 @@ Convert CUnit xml test report to JUnit schema and make it easy to integrate with
1. Install [xUnit plugin](https://wiki.jenkins-ci.org/display/JENKINS/xUnit+Plugin) to your Jenkins CI
2. Configure project's post build action to "Publish xUnit test result report"
3. Choose "custom tool" as report type
4. Specify CUnit report file pattern
5. Specify the path to <code>cunit-to-junit.xsl</code>
4. Specify BCUnit report file pattern
5. Specify the path to <code>bcunit-to-junit.xsl</code>
And there you GO!
......@@ -3,10 +3,10 @@
<xsl:output method="xml" indent="yes" />
<xsl:template match="/">
<testsuites>
<xsl:for-each select="//CUNIT_RUN_SUITE_SUCCESS">
<xsl:for-each select="//BCUNIT_RUN_SUITE_SUCCESS">
<xsl:variable name="suiteName" select="normalize-space(SUITE_NAME/text())"/>
<xsl:variable name="numberOfTests" select="count(CUNIT_RUN_TEST_RECORD/CUNIT_RUN_TEST_SUCCESS)"/>
<xsl:variable name="numberOfFailures" select="count(CUNIT_RUN_TEST_RECORD/CUNIT_RUN_TEST_FAILURE)"/>
<xsl:variable name="numberOfTests" select="count(BCUNIT_RUN_TEST_RECORD/BCUNIT_RUN_TEST_SUCCESS)"/>
<xsl:variable name="numberOfFailures" select="count(BCUNIT_RUN_TEST_RECORD/BCUNIT_RUN_TEST_FAILURE)"/>
<testsuite
name="{$suiteName}"
tests="{$numberOfTests}"
......@@ -15,13 +15,13 @@
errors="0"
skipped="0">
<xsl:for-each select="CUNIT_RUN_TEST_RECORD/CUNIT_RUN_TEST_SUCCESS">
<xsl:for-each select="BCUNIT_RUN_TEST_RECORD/BCUNIT_RUN_TEST_SUCCESS">
<xsl:variable name="testname" select="normalize-space(TEST_NAME/text())"></xsl:variable>
<testcase classname="{$suiteName}" name="{$testname}" time="0.0">
</testcase>
</xsl:for-each>
<xsl:for-each select="CUNIT_RUN_TEST_RECORD/CUNIT_RUN_TEST_FAILURE">
<xsl:for-each select="BCUNIT_RUN_TEST_RECORD/BCUNIT_RUN_TEST_FAILURE">
<xsl:variable name="testname" select="normalize-space(TEST_NAME/text())"></xsl:variable>
<testcase classname="{$suiteName}" name="{$testname}" time="0.0">
<failure>
......
......@@ -79,7 +79,7 @@ else()
linphone_builder_add_builder_to_target(TARGET_bctoolbox polarssl)
endif()
if (ENABLE_UNIT_TESTS)
linphone_builder_add_builder_to_target(TARGET_bctoolbox cunit)
linphone_builder_add_builder_to_target(TARGET_bctoolbox bcunit)
endif()
linphone_builder_add_builder_to_target(TARGET_bctoolbox bctoolbox)
endif()
......
......@@ -28,8 +28,5 @@ set(EP_antlr3c_MAY_BE_FOUND_ON_SYSTEM TRUE)
set(EP_antlr3c_IGNORE_WARNINGS TRUE)
set(EP_antlr3c_LINKING_TYPE ${DEFAULT_VALUE_CMAKE_LINKING_TYPE})
if(MSVC)
set(EP_antlr3c_EXTRA_LDFLAGS "/SAFESEH:NO")
endif()
set(EP_antlr3c_CMAKE_OPTIONS "-DENABLE_DEBUGGER=NO")
......@@ -35,14 +35,14 @@ if(LINPHONE_BUILDER_BUILD_DEPENDENCIES)
list(APPEND EP_bctoolbox_DEPENDENCIES EP_polarssl)
endif()
endif()
list(APPEND EP_bctoolbox_CMAKE_OPTIONS "-DENABLE_TESTS=${ENABLE_UNIT_TESTS}")
list(APPEND EP_bctoolbox_CMAKE_OPTIONS
"-DENABLE_TESTS=${ENABLE_UNIT_TESTS}"
"-DENABLE_TESTS_COMPONENT=${ENABLE_UNIT_TESTS}"
)
if(ENABLE_UNIT_TESTS AND LINPHONE_BUILDER_BUILD_DEPENDENCIES)
list(APPEND EP_bctoolbox_DEPENDENCIES EP_cunit)
list(APPEND EP_bctoolbox_DEPENDENCIES EP_bcunit)
endif()
if(MSVC)
set(EP_bctoolbox_EXTRA_LDFLAGS "/SAFESEH:NO")
endif()
# TODO: Activate strict compilation options on IOS
if(IOS)
list(APPEND EP_bctoolbox_CMAKE_OPTIONS "-DENABLE_STRICT=NO")
......
############################################################################
# cunit.cmake
# bcunit.cmake
# Copyright (C) 2014 Belledonne Communications, Grenoble France
#
############################################################################
......@@ -20,16 +20,12 @@
#
############################################################################
set(EP_cunit_GIT_REPOSITORY "git://git.linphone.org/cunit.git" CACHE STRING "cunit repository URL")
set(EP_cunit_GIT_TAG_LATEST "linphone" CACHE STRING "cunit tag to use when compiling latest version")
set(EP_cunit_GIT_TAG "0a0a9c60f5a1b899ae26b705fa5224ef25377982" CACHE STRING "cunit tag to use")
set(EP_cunit_EXTERNAL_SOURCE_PATHS "cunit" "externals/cunit")
set(EP_cunit_MAY_BE_FOUND_ON_SYSTEM TRUE)
set(EP_cunit_IGNORE_WARNINGS TRUE)
set(EP_bcunit_GIT_REPOSITORY "git://git.linphone.org/bcunit.git" CACHE STRING "bcunit repository URL")
set(EP_bcunit_GIT_TAG_LATEST "linphone" CACHE STRING "bcunit tag to use when compiling latest version")
set(EP_bcunit_GIT_TAG "0a0a9c60f5a1b899ae26b705fa5224ef25377982" CACHE STRING "bcunit tag to use")
set(EP_bcunit_EXTERNAL_SOURCE_PATHS "bcunit")
set(EP_bcunit_IGNORE_WARNINGS TRUE)
set(EP_cunit_LINKING_TYPE ${DEFAULT_VALUE_CMAKE_LINKING_TYPE})
if(MSVC)
set(EP_cunit_EXTRA_LDFLAGS "/SAFESEH:NO")
endif()
set(EP_bcunit_LINKING_TYPE ${DEFAULT_VALUE_CMAKE_LINKING_TYPE})
set(EP_cunit_CMAKE_OPTIONS "-DENABLE_AUTOMATED=YES" "-DENABLE_CONSOLE=NO")
set(EP_bcunit_CMAKE_OPTIONS "-DENABLE_AUTOMATED=YES" "-DENABLE_CONSOLE=NO")
......@@ -32,9 +32,6 @@ if(EP_belcard_FORCE_AUTOTOOLS)
else()
set(EP_belcard_LINKING_TYPE ${DEFAULT_VALUE_CMAKE_LINKING_TYPE})
endif()
if(MSVC)
set(EP_belcard_EXTRA_LDFLAGS "/SAFESEH:NO")
endif()
# TODO: Activate strict compilation options on IOS
if(IOS)
......
......@@ -32,19 +32,12 @@ set(EP_bellesip_DEPENDENCIES EP_bctoolbox)
if(LINPHONE_BUILDER_BUILD_DEPENDENCIES)
if(NOT DISABLE_BC_ANTLR)
list(APPEND EP_bellesip_DEPENDENCIES EP_antlr3c)
message(STATUS "ENABLING ANTLR3C BUILDER")
else()
message(STATUS "DISABLING ANTLR3C BUILDER")
endif()
if (NOT QNX)
list(APPEND EP_bellesip_DEPENDENCIES EP_zlib)
endif()
endif()
if(MSVC)
set(EP_bellesip_EXTRA_LDFLAGS "/SAFESEH:NO")
endif()
set(EP_bellesip_CMAKE_OPTIONS "-DENABLE_RTP_MAP_ALWAYS_IN_SDP=${ENABLE_RTP_MAP_ALWAYS_IN_SDP}")
# TODO: Activate strict compilation options on IOS
......
......@@ -31,12 +31,9 @@ if(EP_belr_FORCE_AUTOTOOLS)
else()
set(EP_belr_LINKING_TYPE ${DEFAULT_VALUE_CMAKE_LINKING_TYPE})
endif()
if(MSVC)
set(EP_belr_EXTRA_LDFLAGS "/SAFESEH:NO")
endif()
set(EP_belr_DEPENDENCIES EP_bctoolbox)
# TODO: Activate strict compilation options on IOS
if(IOS)
list(APPEND EP_belr_CMAKE_OPTIONS "-DENABLE_STRICT=NO")
endif()
......@@ -26,6 +26,3 @@ set(EP_bv16_GIT_TAG "6899f2759c7b19d5402335d3a937c53020abfeca" CACHE STRING "bv1
set(EP_bv16_EXTERNAL_SOURCE_PATHS "externals/bv16-floatingpoint")
set(EP_bv16_LINKING_TYPE ${DEFAULT_VALUE_CMAKE_LINKING_TYPE})
if(MSVC)
set(EP_bv16_EXTRA_LDFLAGS "/SAFESEH:NO")
endif()
......@@ -32,15 +32,12 @@ if(LINPHONE_BUILDER_BUILD_DEPENDENCIES AND NOT APPLE)
# Do not build xml2 on Apple systems (Mac OS X and iOS), it is provided by the system
list(APPEND EP_bzrtp_DEPENDENCIES EP_xml2)
endif()
if(MSVC)
set(EP_bzrtp_EXTRA_LDFLAGS "/SAFESEH:NO")
endif()
if(MINGW)
set(EP_bzrtp_EXTRA_CPPFLAGS "-D__USE_MINGW_ANSI_STDIO")
endif()
set(EP_bzrtp_CMAKE_OPTIONS "-DENABLE_TESTS=${ENABLE_UNIT_TESTS}")
if(ENABLE_UNIT_TESTS AND LINPHONE_BUILDER_BUILD_DEPENDENCIES)
list(APPEND EP_bzrtp_DEPENDENCIES EP_cunit)
list(APPEND EP_bzrtp_DEPENDENCIES EP_bcunit)
endif()
......@@ -19,9 +19,9 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
set(EP_codec2_SVN_REPOSITORY "https://svn.code.sf.net/p/freetel/code/codec2/branches/0.3/" CACHE STRING "codec2 repository URL")
set(EP_codec2_GIT_REPOSITORY "git://git.linphone.org/codec2.git" CACHE STRING " codec2 mirror repository URL")
set(EP_codec2_GIT_TAG_LATEST "linphone" CACHE STRING "codec2 tag to use when compiling latest version")
set(EP_codec2_CMAKE_OPTIONS "-DBUILD_SHARED_LIBS=NO")
set(EP_codec2_EXTRA_CFLAGS "-include ${CMAKE_CURRENT_LIST_DIR}/codec2/codec2_prefixed_symbols.h")
set(EP_codec2_PATCH_COMMAND "${PATCH_PROGRAM}" "-p1" "-i" "${CMAKE_CURRENT_LIST_DIR}/codec2/no-executables.patch")
set(EP_codec2_EXTERNAL_SOURCE_PATHS "externals/codec2")
diff -urN codec2.orig/src/CMakeLists.txt codec2/src/CMakeLists.txt
--- codec2.orig/src/CMakeLists.txt 2016-03-03 14:38:06.682265907 +0100
+++ codec2/src/CMakeLists.txt 2016-03-03 14:38:29.575598823 +0100
@@ -80,6 +80,7 @@
set(CODEBOOKSGE ${D}/gecb.txt)
+if(FALSE)
# when crosscompiling import the executable targets from a file
if(CMAKE_CROSSCOMPILING)
set(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Point to the export file from a native build")
@@ -153,6 +154,7 @@
COMMAND generate_codebook ge_cb ${CODEBOOKSGE} > ${CMAKE_CURRENT_BINARY_DIR}/codebookge.c
DEPENDS generate_codebook ${CODEBOOKSGE}
)
+endif()
#
# codec2 library sources
@@ -203,6 +205,7 @@
PUBLIC_HEADER "${CODEC2_PUBLIC_HEADERS}"
)
+if(FALSE)
add_executable(c2demo c2demo.c)
target_link_libraries(c2demo ${CMAKE_REQUIRED_LIBRARIES} codec2)
@@ -238,6 +241,7 @@
add_executable(fec_dec fec_dec.c golay23.c)
target_link_libraries(fec_dec ${CMAKE_REQUIRED_LIBRARIES} codec2)
+endif()
install(TARGETS codec2 EXPORT codec2-config
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
@@ -250,6 +254,7 @@
# DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/codec2
#)
+if(FALSE)
install(TARGETS
c2demo
c2demo
@@ -265,3 +270,4 @@
fec_dec
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
+endif()
......@@ -129,7 +129,7 @@ else()
"--disable-iconv"
"--disable-mmx"
"--enable-cross-compile"
"--cross-prefix=${ANDROID_TOOLCHAIN_PATH}/"
"--cross-prefix=${TOOLCHAIN_PATH}/"
"--sysroot=${CMAKE_SYSROOT}"
)
set(EP_ffmpeg_TARGET_OS "linux")
......
......@@ -28,6 +28,3 @@ set(EP_gsm_MAY_BE_FOUND_ON_SYSTEM TRUE)
set(EP_gsm_IGNORE_WARNINGS TRUE)
set(EP_gsm_LINKING_TYPE ${DEFAULT_VALUE_CMAKE_LINKING_TYPE})
if(MSVC)
set(EP_gsm_EXTRA_LDFLAGS "/SAFESEH:NO")
endif()
......@@ -35,11 +35,9 @@ if(LINPHONE_BUILDER_BUILD_DEPENDENCIES AND NOT APPLE)
list(APPEND EP_linphone_DEPENDENCIES EP_zlib)
endif()
endif()
if(MSVC)
set(EP_linphone_EXTRA_LDFLAGS "/SAFESEH:NO")
endif()
set(EP_linphone_CMAKE_OPTIONS
"-DENABLE_GTK_UI=${ENABLE_GTK_UI}"
"-DENABLE_VIDEO=${ENABLE_VIDEO}"
"-DENABLE_DEBUG_LOGS=${ENABLE_DEBUG_LOGS}"
"-DENABLE_DOC=${ENABLE_DOC}"
......
......@@ -31,5 +31,4 @@ set(EP_mbedtls_LINKING_TYPE "-DUSE_STATIC_MBEDTLS_LIBRARY=NO" "-DUSE_SHARED_MBED
set(EP_mbedtls_CMAKE_OPTIONS "-DENABLE_PROGRAMS=NO" "-DENABLE_TESTING=NO")
if(MSVC)
set(EP_mbedtls_EXTRA_CFLAGS "-DMBEDTLS_PLATFORM_SNPRINTF_MACRO=_snprintf -DMBEDTLS_EXPORTS")
set(EP_mbedtls_EXTRA_LDFLAGS "/SAFESEH:NO")
endif()
......@@ -36,9 +36,6 @@ set(EP_ms2_DEPENDENCIES EP_ortp EP_bctoolbox)
if(ANDROID)
list(APPEND EP_ms2_DEPENDENCIES EP_androidcpufeatures EP_androidsupport)
endif()
if(MSVC)
set(EP_ms2_EXTRA_LDFLAGS "/SAFESEH:NO")
endif()
set(EP_ms2_CMAKE_OPTIONS
"-DENABLE_NON_FREE_CODECS=${ENABLE_NON_FREE_CODECS}"
......@@ -52,6 +49,7 @@ if(IOS)
list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_STRICT=NO")
endif()
list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_G726=${ENABLE_G726}")
list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_GSM=${ENABLE_GSM}")
if(ENABLE_GSM AND LINPHONE_BUILDER_BUILD_DEPENDENCIES)
list(APPEND EP_ms2_DEPENDENCIES EP_gsm)
......
......@@ -22,7 +22,6 @@
set(EP_mscodec2_GIT_REPOSITORY "git://git.linphone.org/mscodec2.git" CACHE STRING "mscodec2 repository URL")
set(EP_mscodec2_GIT_TAG_LATEST "master" CACHE STRING "mscodec2 tag to use when compiling latest version")
set(EP_mscodec2_GIT_TAG "1.0.2" CACHE STRING "mscodec2 tag to use")
set(EP_mscodec2_EXTERNAL_SOURCE_PATHS "mscodec2")
set(EP_mscodec2_GROUPABLE YES)
......
......@@ -28,6 +28,3 @@ set(EP_msopenh264_GROUPABLE YES)
set(EP_msopenh264_LINKING_TYPE ${DEFAULT_VALUE_CMAKE_PLUGIN_LINKING_TYPE})
set(EP_msopenh264_DEPENDENCIES EP_ms2 EP_openh264)
if(MSVC)
set(EP_msopenh264_EXTRA_LDFLAGS "/SAFESEH:NO")
endif()
......@@ -27,5 +27,4 @@ set(EP_mswasapi_EXTERNAL_SOURCE_PATHS "mswasapi")
set(EP_mswasapi_GROUPABLE YES)
set(EP_mswasapi_LINKING_TYPE ${DEFAULT_VALUE_CMAKE_PLUGIN_LINKING_TYPE})
set(EP_mswasapi_EXTRA_LDFLAGS "/SAFESEH:NO")
set(EP_mswasapi_DEPENDENCIES EP_ms2)
......@@ -52,9 +52,9 @@ else()
set(EP_openh264_ADDITIONAL_OPTIONS "OS=\"msvc\"")
elseif(ANDROID)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armeabi-v7a")
set(EP_openh264_ADDITIONAL_OPTIONS "OS=\"android\" NDKROOT=\"${ANDROID_NDK_PATH}\" TOOLCHAINPREFIX=\"${ANDROID_TOOLCHAIN_PREFIX}\" TARGET=\"android-${CMAKE_ANDROID_API}\" ARCH=\"arm\"")
set(EP_openh264_ADDITIONAL_OPTIONS "OS=\"android\" NDKROOT=\"${ANDROID_NDK_PATH}\" TOOLCHAINPREFIX=\"${TOOLCHAIN_PREFIX}\" TARGET=\"android-${CMAKE_ANDROID_API}\" ARCH=\"arm\"")
else()
set(EP_openh264_ADDITIONAL_OPTIONS "OS=\"android\" NDKROOT=\"${ANDROID_NDK_PATH}\" TOOLCHAINPREFIX=\"${ANDROID_TOOLCHAIN_PREFIX}\" TARGET=\"android-${CMAKE_ANDROID_API}\" ARCH=\"x86\"")
set(EP_openh264_ADDITIONAL_OPTIONS "OS=\"android\" NDKROOT=\"${ANDROID_NDK_PATH}\" TOOLCHAINPREFIX=\"${TOOLCHAIN_PREFIX}\" TARGET=\"android-${CMAKE_ANDROID_API}\" ARCH=\"x86\"")
endif()
elseif(APPLE)
if(IOS)
......
......@@ -30,10 +30,14 @@ endif()
file(GLOB OPENH264_LIBS "${INSTALL_PREFIX}/lib/libopenh264.*.dylib")
foreach(OPENH264_LIB IN LISTS ${OPENH264_LIBS})
string(REGEX REPLACE ".+/(libopenh264\..\.dylib)$"
string(REGEX REPLACE ".+/(libopenh264\..\.dylib)$"
"@rpath/\1"
OPENH264_LIB_ID
${OPENH264_LIB}
)
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")
endif()
......@@ -33,9 +33,6 @@ else()
set(EP_ortp_LINKING_TYPE ${DEFAULT_VALUE_CMAKE_LINKING_TYPE})
endif()
set(EP_ortp_DEPENDENCIES EP_bctoolbox)
if(MSVC)
set(EP_ortp_EXTRA_LDFLAGS "/SAFESEH:NO")
endif()
set(EP_ortp_SPEC_FILE "ortp.spec")
set(EP_ortp_CMAKE_OPTIONS "-DENABLE_DOC=${ENABLE_DOC}")
......
......@@ -28,8 +28,5 @@ set(EP_polarssl_MAY_BE_FOUND_ON_SYSTEM TRUE)
set(EP_polarssl_IGNORE_WARNINGS TRUE)
set(EP_polarssl_LINKING_TYPE "-DUSE_SHARED_POLARSSL_LIBRARY=1")
if(MSVC)
set(EP_polarssl_EXTRA_LDFLAGS "/SAFESEH:NO")
endif()
set(EP_polarssl_CMAKE_OPTIONS "-DENABLE_PROGRAMS=0" "-DENABLE_TESTING=0")
......@@ -21,7 +21,7 @@
############################################################################
set(soci_filename "soci-3.2.3.tar.gz")
set(EP_soci_URL "http://downloads.sourceforge.net/soci/${soci_filename}")
set(EP_soci_URL "${CMAKE_CURRENT_SOURCE_DIR}/builders/soci/${soci_filename}")
set(EP_soci_URL_HASH "SHA1=5e527cf5c1740198fa706fc8821af45b34867ee1")
set(EP_soci_BUILD_METHOD "rpm")
......@@ -31,7 +31,7 @@ set(EP_soci_RPMBUILD_OPTIONS "--without postgresql --without sqlite3 --without o
#create source dir and copy the tar.gz inside
set(EP_soci_PATCH_COMMAND "${CMAKE_COMMAND}" "-E" "make_directory" "${LINPHONE_BUILDER_WORK_DIR}/rpmbuild/SOURCES/")
set(EP_soci_PATCH_COMMAND ${EP_soci_PATCH_COMMAND} "COMMAND" "${CMAKE_COMMAND}" "-E" "copy" "${LINPHONE_BUILDER_WORK_DIR}/Download/EP_soci/${soci_filename}" "${LINPHONE_BUILDER_WORK_DIR}/rpmbuild/SOURCES/")
set(EP_soci_PATCH_COMMAND ${EP_soci_PATCH_COMMAND} "COMMAND" "${CMAKE_COMMAND}" "-E" "copy" "${EP_soci_URL}" "${LINPHONE_BUILDER_WORK_DIR}/rpmbuild/SOURCES/")
set(EP_soci_PATCH_COMMAND ${EP_soci_PATCH_COMMAND} "COMMAND" "${CMAKE_COMMAND}" "-E" "copy" "${CMAKE_CURRENT_SOURCE_DIR}/builders/soci/soci_libdir.patch" "${LINPHONE_BUILDER_WORK_DIR}/rpmbuild/SOURCES/")
set(EP_soci_PATCH_COMMAND ${EP_soci_PATCH_COMMAND} "COMMAND" "${CMAKE_COMMAND}" "-E" "copy" ${EP_soci_CONFIG_H_FILE} "<BINARY_DIR>")
......
......@@ -29,6 +29,3 @@ set(EP_speex_IGNORE_WARNINGS TRUE)
set(EP_speex_LINKING_TYPE ${DEFAULT_VALUE_CMAKE_LINKING_TYPE})
set(EP_speex_CMAKE_OPTIONS "-DENABLE_SPEEX_DSP=YES" "-DENABLE_SPEEX_CODEC=${ENABLE_SPEEX}")
if(MSVC)
set(EP_speex_EXTRA_LDFLAGS "/SAFESEH:NO")
endif()
......@@ -10,6 +10,7 @@ sqlite3_free
sqlite3_last_insert_rowid
sqlite3_mprintf
sqlite3_open
sqlite3_open_v2
sqlite3_open16
sqlite3_prepare_v2
sqlite3_profile
......
......@@ -28,6 +28,3 @@ set(EP_srtp_MAY_BE_FOUND_ON_SYSTEM TRUE)
set(EP_srtp_IGNORE_WARNINGS TRUE)
set(EP_srtp_LINKING_TYPE ${DEFAULT_VALUE_CMAKE_LINKING_TYPE})
if(MSVC)
set(EP_srtp_EXTRA_LDFLAGS "/SAFESEH:NO")
endif()
......@@ -22,7 +22,7 @@
set(EP_tunnel_GIT_REPOSITORY "gitosis@git.linphone.org:tunnel.git" CACHE STRING "tunnel repository URL") # Private repository
set(EP_tunnel_GIT_TAG_LATEST "master" CACHE STRING "tunnel tag to use when compiling latest version")
set(EP_tunnel_GIT_TAG "f4ea4c93070b5e4e838aca701a724d0bfbbb6a05" CACHE STRING "tunnel tag to use")
set(EP_tunnel_GIT_TAG "23027a3765d92b6df42bc69acb0d1ab842f344aa" CACHE STRING "tunnel tag to use")
set(EP_tunnel_EXTERNAL_SOURCE_PATHS "tunnel")
set(EP_tunnel_GROUPABLE YES)
......
......@@ -28,12 +28,14 @@ set(EP_v4l_IGNORE_WARNINGS TRUE)
set(EP_v4l_EXTERNAL_SOURCE_PATHS "externals/v4l-utils")
set(EP_v4l_BUILD_METHOD "autotools")
set(EP_v4l_USE_AUTORECONF TRUE)
set(EP_v4l_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_v4l_CONFIGURE_OPTIONS
"--disable-v4l-utils"
"--disable-qv4l2"
"--disable-libdvbv5"
"--with-udevdir=${CMAKE_INSTALL_PREFIX}/etc"
"--without-jpeg"
......
......@@ -114,6 +114,11 @@ else()
set(EP_vpx_TARGET "x86-darwin10-gcc")
endif()
endif()
if(CMAKE_GENERATOR STREQUAL "Xcode")
# It appears that the build occurs in the cmake directory instead of the Build/vpx one with Xcode, so these flags are needed for include files to be found...
set(EP_vpx_EXTRA_CFLAGS "${EP_vpx_EXTRA_CFLAGS} -I${LINPHONE_BUILDER_WORK_DIR}/Build/vpx")
set(EP_vpx_EXTRA_ASFLAGS "${EP_vpx_EXTRA_ASFLAGS} -I${LINPHONE_BUILDER_WORK_DIR}/Build/vpx")
endif()
set(EP_vpx_LINKING_TYPE "--enable-static" "--disable-shared" "--enable-pic")
elseif(ANDROID)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armeabi")
......@@ -124,7 +129,7 @@ else()
set(EP_vpx_TARGET "x86-android-gcc")
endif()
list(APPEND EP_vpx_CONFIGURE_OPTIONS
"--sdk-path=${ANDROID_NDK_PATH}"
"--sdk-path=${ANDROID_NDK_PATH}/"
"--enable-pic"
)
set(EP_vpx_LINKING_TYPE "--enable-static" "--disable-shared" "--enable-pic")
......
......@@ -23,11 +23,6 @@
set(EP_zlib_GIT_REPOSITORY "git://git.linphone.org/zlib.git" CACHE STRING "zlib repository URL")
set(EP_zlib_GIT_TAG_LATEST "master" CACHE STRING "zlib tag to use when compiling latest version")
set(EP_zlib_GIT_TAG "91eb77a7c5bfe7b4cc6b722aa96548d7143a9936" CACHE STRING "zlib tag to use")
set(EP_zlib_EXTERNAL_SOURCE_PATHS "zlib")
set(EP_zlib_EXTERNAL_SOURCE_PATHS "externals/zlib")
set(EP_zlib_MAY_BE_FOUND_ON_SYSTEM TRUE)
set(EP_zlib_IGNORE_WARNINGS TRUE)
set(EP_zlib_EXTERNAL_SOURCE_PATHS "externals/zlib")
if(MSVC)
set(EP_zlib_EXTRA_LDFLAGS "/SAFESEH:NO")
endif()
......@@ -436,6 +436,8 @@ macro(linphone_builder_create_autogen_command PROJNAME)
endforeach()
endif()
set(ep_autogen_command "\"${ep_source}/autogen.sh\" ${ep_autogen_options}")
elseif(EP_${PROJNAME}_USE_AUTORECONF)
set(ep_autogen_command "autoreconf -vfi ${ep_source}")
else()
set(ep_autogen_command "")
endif()
......@@ -572,8 +574,6 @@ macro(linphone_builder_add_external_project PROJNAME)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/mingw_configure.bat.cmake ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_configure.bat)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/mingw_build.bat.cmake ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_build.bat)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/mingw_install.bat.cmake ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_install.bat)
# Build in source with MinGW as build out-of-source does not work
set(ep_build "${ep_source}")
if(ep_autogen_command)
set(ep_autogen_redirect_to_file ${ep_redirect_to_file})
endif()
......@@ -701,7 +701,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} -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} -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}
......@@ -899,3 +899,11 @@ macro(linphone_builder_add_cmake_option BUILDER_NAME OPTION)
endif()
list(APPEND EP_${BUILDER_NAME}_CMAKE_OPTIONS ${OPTION})
endmacro()
macro(linphone_builder_add_extra_cflags BUILDER_NAME CFLAGS)
set(EP_${BUILDER_NAME}_EXTRA_CFLAGS "${EP_${BUILDER_NAME}_EXTRA_CFLAGS} ${CFLAGS}")
endmacro()
macro(linphone_builder_add_extra_ldflags BUILDER_NAME LDFLAGS)
set(EP_${BUILDER_NAME}_EXTRA_LDFLAGS "${EP_${BUILDER_NAME}_EXTRA_LDFLAGS} ${LDFLAGS}")
endmacro()
#!/bin/sh
@ANDROID_TOOLCHAIN_STRIP@ $*
\ No newline at end of file
@TOOLCHAIN_STRIP@ $*
......@@ -21,7 +21,6 @@
############################################################################
# Define default values for the linphone builder options
set(DEFAULT_VALUE_ENABLE_DTLS ON)
set(DEFAULT_VALUE_ENABLE_FFMPEG ON)
set(DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES ON)
set(DEFAULT_VALUE_ENABLE_GSM ON)
......@@ -81,7 +80,7 @@ set(EP_ffmpeg_LINKING_TYPE "--enable-static" "--disable-shared" "--enable-pic")
# linphone
linphone_builder_add_cmake_option(linphone "-DENABLE_RELATIVE_PREFIX=YES")
linphone_builder_add_cmake_option(linphone "-DENABLE_CONSOLE_UI=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_GTK_UI=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_DAEMON=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_NOTIFY=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_TOOLS=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_TUTORIALS=NO")
......@@ -120,12 +119,14 @@ linphone_builder_add_cmake_option(ortp "-DENABLE_DOC=NO")
set(EP_ortp_LINKING_TYPE "-DENABLE_STATIC=NO" "-DENABLE_SHARED=YES")
# polarssl
set(EP_polarssl_LINKING_TYPE "-DUSE_SHARED_POLARSSL_LIBRARY=0")
set(EP_polarssl_LINKING_TYPE "-DUSE_SHARED_POLARSSL_LIBRARY=NO")
# speex
linphone_builder_add_cmake_option(speex "-DENABLE_FLOAT_API=NO")
linphone_builder_add_cmake_option(speex "-DENABLE_FIXED_POINT=YES")
linphone_builder_add_cmake_option(speex "-DENABLE_ARM_NEON_INTRINSICS=1")
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armeabi-v7a")
linphone_builder_add_cmake_option(speex "-DENABLE_ARM_NEON_INTRINSICS=YES")
endif()
# vpx
set(EP_vpx_LINKING_TYPE "--enable-static" "--disable-shared")
......@@ -135,6 +136,12 @@ set(EP_x264_LINKING_TYPE "--enable-static" "--enable-pic")
set(EP_x264_INSTALL_TARGET "install-lib-static")
# Copy c++ library to install prefix
file(COPY "${ANDROID_NDK_PATH}/sources/cxx-stl/gnu-libstdc++/${GCC_VERSION}/libs/${CMAKE_SYSTEM_PROCESSOR}/libgnustl_shared.so"
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib"
)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# GDB server setup
linphone_builder_apply_flags()
......
......@@ -58,7 +58,7 @@ linphone_builder_add_cmake_option(bzrtp "-DENABLE_TESTS=NO")
# linphone
linphone_builder_add_cmake_option(linphone "-DENABLE_RELATIVE_PREFIX=YES")
linphone_builder_add_cmake_option(linphone "-DENABLE_CONSOLE_UI=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_GTK_UI=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_DAEMON=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_NOTIFY=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_TOOLS=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_TUTORIALS=NO")
......@@ -83,6 +83,7 @@ linphone_builder_add_cmake_option(ms2 "-DENABLE_XV=NO")
linphone_builder_add_cmake_option(ms2 "-DENABLE_MKV=YES")
linphone_builder_add_cmake_option(ms2 "-DENABLE_QNX=YES")
linphone_builder_add_cmake_option(ms2 "-DENABLE_V4L=NO")
linphone_builder_add_cmake_option(ms2 "-DENABLE_TOOLS=NO")
linphone_builder_add_cmake_option(ms2 "-DENABLE_UNIT_TESTS=NO")
# vpx
......
############################################################################
# config-desktop.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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
set(DEFAULT_VALUE_CMAKE_LINKING_TYPE "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
# Global configuration
if(APPLE)
if(NOT CMAKE_OSX_DEPLOYMENT_TARGET) #is it still useful?
#without instruction chose to target lower version between current machine and current used SDK
execute_process(COMMAND sw_vers -productVersion COMMAND awk -F \\. "{printf \"%i.%i\",$1,$2}" RESULT_VARIABLE sw_vers_version OUTPUT_VARIABLE CURRENT_OSX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND xcrun --sdk macosx --show-sdk-version RESULT_VARIABLE xcrun_sdk_version OUTPUT_VARIABLE CURRENT_SDK_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
if(${CURRENT_OSX_VERSION} VERSION_LESS ${CURRENT_SDK_VERSION})
set(CMAKE_OSX_DEPLOYMENT_TARGET ${CURRENT_OSX_VERSION})
else()
set(CMAKE_OSX_DEPLOYMENT_TARGET ${CURRENT_SDK_VERSION})
endif()
endif()
if(CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS "10.8")
# Resolve conflict between c++ libraries when building C++11 libraries on Mac OS X 10.7
set(LINPHONE_BUILDER_CXXFLAGS "-stdlib=libc++")
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CMAKE_OSX_ARCHITECTURES "x86_64")
set(LINPHONE_BUILDER_HOST "x86_64-apple-darwin")
else()
set(CMAKE_OSX_ARCHITECTURES "i386")
set(LINPHONE_BUILDER_HOST "i686-apple-darwin")
endif()
set(CMAKE_MACOSX_RPATH 1)
endif()
if(WIN32)
set(LINPHONE_BUILDER_CPPFLAGS "-D_WIN32_WINNT=0x0600 -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS")
if(MSVC AND MSVC_VERSION GREATER 1600) # Visual Studio 2010 defines this macro itself
set(LINPHONE_BUILDER_CPPFLAGS "${LINPHONE_BUILDER_CPPFLAGS} -D_ALLOW_KEYWORD_MACROS")
endif()
endif()
# Adjust PKG_CONFIG_PATH to include install directory
if(NOT LINPHONE_BUILDER_PKG_CONFIG_PATH)
if(UNIX)
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/")
else() # Windows
set(LINPHONE_BUILDER_PKG_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/")
endif()
endif()
include(GNUInstallDirs)
if(NOT CMAKE_INSTALL_RPATH)
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" _IS_SYSTEM_DIR)
if(_IS_SYSTEM_DIR STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}")
if(NOT CMAKE_INSTALL_LIBDIR STREQUAL "lib")
list(APPEND CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif()
endif()
endif()
# Include builders
include(builders/CMakeLists.txt)
# linphone
if(WIN32)
linphone_builder_add_cmake_option(linphone "-DENABLE_RELATIVE_PREFIX=YES")
else()
linphone_builder_add_cmake_option(linphone "-DENABLE_RELATIVE_PREFIX=${ENABLE_RELATIVE_PREFIX}")
endif()
# ms2
if(WIN32)
linphone_builder_add_cmake_option(ms2 "-DENABLE_RELATIVE_PREFIX=YES")
linphone_builder_add_extra_ldflags(ms2 "/SAFESEH:NO")
else()
linphone_builder_add_cmake_option(ms2 "-DENABLE_RELATIVE_PREFIX=${ENABLE_RELATIVE_PREFIX}")
endif()
# opencoreamr
if(NOT WIN32)
set(EP_opencoreamr_EXTRA_CFLAGS "${EP_opencoreamr_EXTRA_CFLAGS} -fPIC")
set(EP_opencoreamr_EXTRA_CXXFLAGS "${EP_opencoreamr_EXTRA_CXXFLAGS} -fPIC")
set(EP_opencoreamr_EXTRA_LDFLAGS "${EP_opencoreamr_EXTRA_LDFLAGS} -fPIC")
endif()
# openh264
set(EP_openh264_LINKING_TYPE "-shared")
# voamrwbenc
if(NOT WIN32)
set(