Commit 4708bf85 authored by Ghislain MARY's avatar Ghislain MARY

Add possibility to use prebuilt dependencies.

parent 36418162
......@@ -29,6 +29,7 @@ set(LINPHONE_BUILDER_CONFIG_FILE "configs/config-desktop.cmake" CACHE STRING "Pa
set(LINPHONE_BUILDER_WORK_DIR "${CMAKE_CURRENT_SOURCE_DIR}/WORK" CACHE PATH "Working directory for the build.")
set(LINPHONE_BUILDER_TARGET "linphone" CACHE STRING "Target to build.")
set_property(CACHE LINPHONE_BUILDER_TARGET PROPERTY STRINGS "belle-sip" "ortp" "ms2" "ms2-plugins" "linphone" "flexisip")
set(LINPHONE_BUILDER_PREBUILT_URL "" CACHE STRING "URL to download some prebuilt dependencies.")
option(LINPHONE_BUILDER_LATEST "Build latest versions (from git)." NO)
......
......@@ -20,70 +20,84 @@
#
############################################################################
if(WIN32)
set(EP_ffmpeg_PATCH_OPTIONS "--binary")
if(LINPHONE_BUILDER_PREBUILT_URL)
set(EP_ffmpeg_FILENAME "ffmpeg-0.10.2-${LINPHONE_BUILDER_ARCHITECTURE}.zip")
file(DOWNLOAD "${LINPHONE_BUILDER_PREBUILT_URL}/${EP_ffmpeg_FILENAME}" "${CMAKE_CURRENT_BINARY_DIR}/${EP_ffmpeg_FILENAME}" STATUS EP_ffmpeg_FILENAME_STATUS)
list(GET EP_ffmpeg_FILENAME_STATUS 0 EP_ffmpeg_DOWNLOAD_STATUS)
if(NOT EP_ffmpeg_DOWNLOAD_STATUS)
set(EP_ffmpeg_PREBUILT 1)
endif()
endif()
set(EP_ffmpeg_URL "http://ffmpeg.org/releases/ffmpeg-0.10.2.tar.gz")
set(EP_ffmpeg_URL_HASH "MD5=f449c9fb925e80c457e82187e6c20910")
set(EP_ffmpeg_BUILD_METHOD "autotools")
set(EP_ffmpeg_CONFIGURE_OPTIONS
"--disable-zlib"
"--disable-bzlib"
"--disable-mmx"
"--disable-ffplay"
"--disable-ffprobe"
"--disable-ffserver"
"--disable-avdevice"
"--disable-avfilter"
"--disable-network"
"--disable-avformat"
"--disable-everything"
"--enable-decoder=mjpeg"
"--enable-encoder=mjpeg"
# Disable video acceleration support for compatibility with older Mac OS X versions (vda, vaapi, vdpau).
"--disable-vda"
"--disable-vaapi"
"--disable-vdpau"
)
if(ENABLE_H263)
list(APPEND EP_ffmpeg_CONFIGURE_OPTIONS
"--enable-decoder=h263"
"--enable-encoder=h263"
)
endif()
if(ENABLE_H263P)
list(APPEND EP_ffmpeg_CONFIGURE_OPTIONS "--enable-encoder=h263p")
endif()
if(ENABLE_MPEG4)
list(APPEND EP_ffmpeg_CONFIGURE_OPTIONS
"--enable-decoder=mpeg4"
"--enable-encoder=mpeg4"
if(EP_ffmpeg_PREBUILT)
set(EP_ffmpeg_URL "${CMAKE_CURRENT_BINARY_DIR}/${EP_ffmpeg_FILENAME}")
set(EP_ffmpeg_BUILD_METHOD "prebuilt")
else()
if(WIN32)
set(EP_ffmpeg_PATCH_OPTIONS "--binary")
endif()
set(EP_ffmpeg_URL "http://ffmpeg.org/releases/ffmpeg-0.10.2.tar.gz")
set(EP_ffmpeg_URL_HASH "MD5=f449c9fb925e80c457e82187e6c20910")
set(EP_ffmpeg_BUILD_METHOD "autotools")
set(EP_ffmpeg_CONFIGURE_OPTIONS
"--disable-zlib"
"--disable-bzlib"
"--disable-mmx"
"--disable-ffplay"
"--disable-ffprobe"
"--disable-ffserver"
"--disable-avdevice"
"--disable-avfilter"
"--disable-network"
"--disable-avformat"
"--disable-everything"
"--enable-decoder=mjpeg"
"--enable-encoder=mjpeg"
# Disable video acceleration support for compatibility with older Mac OS X versions (vda, vaapi, vdpau).
"--disable-vda"
"--disable-vaapi"
"--disable-vdpau"
)
endif()
set(EP_ffmpeg_LINKING_TYPE "--disable-static" "--enable-shared")
set(EP_ffmpeg_PATCH_COMMAND "${PATCH_PROGRAM}" "-p1" "-i" "${CMAKE_CURRENT_SOURCE_DIR}/builders/ffmpeg/no-sdl.patch" ${EP_ffmpeg_PATCH_OPTIONS})
set(EP_ffmpeg_ARCH "i386")
if(ENABLE_H263)
list(APPEND EP_ffmpeg_CONFIGURE_OPTIONS
"--enable-decoder=h263"
"--enable-encoder=h263"
)
endif()
if(ENABLE_H263P)
list(APPEND EP_ffmpeg_CONFIGURE_OPTIONS "--enable-encoder=h263p")
endif()
if(ENABLE_MPEG4)
list(APPEND EP_ffmpeg_CONFIGURE_OPTIONS
"--enable-decoder=mpeg4"
"--enable-encoder=mpeg4"
)
endif()
set(EP_ffmpeg_LINKING_TYPE "--disable-static" "--enable-shared")
set(EP_ffmpeg_PATCH_COMMAND "${PATCH_PROGRAM}" "-p1" "-i" "${CMAKE_CURRENT_SOURCE_DIR}/builders/ffmpeg/no-sdl.patch" ${EP_ffmpeg_PATCH_OPTIONS})
set(EP_ffmpeg_ARCH "i386")
if(WIN32)
set(EP_ffmpeg_TARGET_OS "mingw32")
set(EP_ffmpeg_EXTRA_LDFLAGS "-static-libgcc")
set(EP_ffmpeg_PATCH_COMMAND ${EP_ffmpeg_PATCH_COMMAND} "COMMAND" "${PATCH_PROGRAM}" "-p1" "-i" "${CMAKE_CURRENT_SOURCE_DIR}/builders/ffmpeg/mingw-no-lib.patch" ${EP_ffmpeg_PATCH_OPTIONS})
else()
if(APPLE)
set(EP_ffmpeg_TARGET_OS "darwin")
set(EP_ffmpeg_PATCH_COMMAND ${EP_ffmpeg_PATCH_COMMAND} "COMMAND" "${PATCH_PROGRAM}" "-p1" "-i" "${CMAKE_CURRENT_SOURCE_DIR}/builders/ffmpeg/configure-osx.patch" ${EP_ffmpeg_PATCH_OPTIONS})
if(WIN32)
set(EP_ffmpeg_TARGET_OS "mingw32")
set(EP_ffmpeg_EXTRA_LDFLAGS "-static-libgcc")
set(EP_ffmpeg_PATCH_COMMAND ${EP_ffmpeg_PATCH_COMMAND} "COMMAND" "${PATCH_PROGRAM}" "-p1" "-i" "${CMAKE_CURRENT_SOURCE_DIR}/builders/ffmpeg/mingw-no-lib.patch" ${EP_ffmpeg_PATCH_OPTIONS})
else()
set(EP_ffmpeg_TARGET_OS "linux")
if(APPLE)
set(EP_ffmpeg_TARGET_OS "darwin")
set(EP_ffmpeg_PATCH_COMMAND ${EP_ffmpeg_PATCH_COMMAND} "COMMAND" "${PATCH_PROGRAM}" "-p1" "-i" "${CMAKE_CURRENT_SOURCE_DIR}/builders/ffmpeg/configure-osx.patch" ${EP_ffmpeg_PATCH_OPTIONS})
else()
set(EP_ffmpeg_TARGET_OS "linux")
endif()
endif()
endif()
set(EP_ffmpeg_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--arch=${EP_ffmpeg_ARCH}"
"--target-os=${EP_ffmpeg_TARGET_OS}"
)
set(EP_ffmpeg_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--arch=${EP_ffmpeg_ARCH}"
"--target-os=${EP_ffmpeg_TARGET_OS}"
)
if(ENABLE_X264)
list(APPEND EP_ffmpeg_CONFIGURE_OPTIONS "--enable-decoder=h264")
if(ENABLE_X264)
list(APPEND EP_ffmpeg_CONFIGURE_OPTIONS "--enable-decoder=h264")
endif()
endif()
......@@ -20,18 +20,32 @@
#
############################################################################
set(EP_opencoreamr_URL "http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.3.tar.gz")
set(EP_opencoreamr_URL_HASH "MD5=09d2c5dfb43a9f6e9fec8b1ae678e725")
set(EP_opencoreamr_BUILD_METHOD "autotools")
set(EP_opencoreamr_CONFIGURE_OPTIONS )
set(EP_opencoreamr_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_opencoreamr_LINKING_TYPE "--disable-static" "--enable-shared")
if(LINPHONE_BUILDER_PREBUILT_URL)
set(EP_opencoreamr_FILENAME "opencoreamr-0.1.3-${LINPHONE_BUILDER_ARCHITECTURE}.zip")
file(DOWNLOAD "${LINPHONE_BUILDER_PREBUILT_URL}/${EP_opencoreamr_FILENAME}" "${CMAKE_CURRENT_BINARY_DIR}/${EP_opencoreamr_FILENAME}" STATUS EP_opencoreamr_FILENAME_STATUS)
list(GET EP_opencoreamr_FILENAME_STATUS 0 EP_opencoreamr_DOWNLOAD_STATUS)
if(NOT EP_opencoreamr_DOWNLOAD_STATUS)
set(EP_opencoreamr_PREBUILT 1)
endif()
endif()
if(ENABLE_AMRNB)
list(APPEND EP_opencoreamr_CONFIGURE_OPTIONS "--enable-amrnb-decoder" "--enable-amrnb-encoder")
if(EP_opencoreamr_PREBUILT)
set(EP_opencoreamr_URL "${CMAKE_CURRENT_BINARY_DIR}/${EP_opencoreamr_FILENAME}")
set(EP_opencoreamr_BUILD_METHOD "prebuilt")
else()
list(APPEND EP_opencoreamr_CONFIGURE_OPTIONS "--disable-amrnb-decoder" "--disable-amrnb-encoder")
set(EP_opencoreamr_URL "http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.3.tar.gz")
set(EP_opencoreamr_URL_HASH "MD5=09d2c5dfb43a9f6e9fec8b1ae678e725")
set(EP_opencoreamr_BUILD_METHOD "autotools")
set(EP_opencoreamr_CONFIGURE_OPTIONS )
set(EP_opencoreamr_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_opencoreamr_LINKING_TYPE "--disable-static" "--enable-shared")
if(ENABLE_AMRNB)
list(APPEND EP_opencoreamr_CONFIGURE_OPTIONS "--enable-amrnb-decoder" "--enable-amrnb-encoder")
else()
list(APPEND EP_opencoreamr_CONFIGURE_OPTIONS "--disable-amrnb-decoder" "--disable-amrnb-encoder")
endif()
endif()
......@@ -20,14 +20,28 @@
#
############################################################################
set(EP_opus_URL "http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz")
set(EP_opus_URL_HASH "MD5=86eedbd3c5a0171d2437850435e6edff")
set(EP_opus_BUILD_METHOD "autotools")
set(EP_opus_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_opus_CONFIGURE_OPTIONS
"--disable-doc"
)
set(EP_opus_LINKING_TYPE "--disable-static" "--enable-shared")
if(LINPHONE_BUILDER_PREBUILT_URL)
set(EP_opus_FILENAME "opus-1.0.3-${LINPHONE_BUILDER_ARCHITECTURE}.zip")
file(DOWNLOAD "${LINPHONE_BUILDER_PREBUILT_URL}/${EP_opus_FILENAME}" "${CMAKE_CURRENT_BINARY_DIR}/${EP_opus_FILENAME}" STATUS EP_opus_FILENAME_STATUS)
list(GET EP_opus_FILENAME_STATUS 0 EP_opus_DOWNLOAD_STATUS)
if(NOT EP_opus_DOWNLOAD_STATUS)
set(EP_opus_PREBUILT 1)
endif()
endif()
if(EP_opus_PREBUILT)
set(EP_opus_URL "${CMAKE_CURRENT_BINARY_DIR}/${EP_opus_FILENAME}")
set(EP_opus_BUILD_METHOD "prebuilt")
else()
set(EP_opus_URL "http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz")
set(EP_opus_URL_HASH "MD5=86eedbd3c5a0171d2437850435e6edff")
set(EP_opus_BUILD_METHOD "autotools")
set(EP_opus_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_opus_CONFIGURE_OPTIONS
"--disable-doc"
)
set(EP_opus_LINKING_TYPE "--disable-static" "--enable-shared")
endif()
......@@ -20,14 +20,28 @@
#
############################################################################
set(EP_voamrwbenc_URL "http://downloads.sourceforge.net/project/opencore-amr/vo-amrwbenc/vo-amrwbenc-0.1.3.tar.gz")
set(EP_voamrwbenc_URL_HASH "MD5=f63bb92bde0b1583cb3cb344c12922e0")
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_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>")
set(EP_voamrwbenc_DEPENDENCIES EP_opencoreamr)
if(LINPHONE_BUILDER_PREBUILT_URL)
set(EP_voamrwbenc_FILENAME "voamrwbenc-0.1.3-${LINPHONE_BUILDER_ARCHITECTURE}.zip")
file(DOWNLOAD "${LINPHONE_BUILDER_PREBUILT_URL}/${EP_voamrwbenc_FILENAME}" "${CMAKE_CURRENT_BINARY_DIR}/${EP_voamrwbenc_FILENAME}" STATUS EP_voamrwbenc_FILENAME_STATUS)
list(GET EP_voamrwbenc_FILENAME_STATUS 0 EP_voamrwbenc_DOWNLOAD_STATUS)
if(NOT EP_voamrwbenc_DOWNLOAD_STATUS)
set(EP_voamrwbenc_PREBUILT 1)
endif()
endif()
if(EP_voamrwbenc_PREBUILT)
set(EP_voamrwbenc_URL "${CMAKE_CURRENT_BINARY_DIR}/${EP_voamrwbenc_FILENAME}")
set(EP_voamrwbenc_BUILD_METHOD "prebuilt")
else()
set(EP_voamrwbenc_URL "http://downloads.sourceforge.net/project/opencore-amr/vo-amrwbenc/vo-amrwbenc-0.1.3.tar.gz")
set(EP_voamrwbenc_URL_HASH "MD5=f63bb92bde0b1583cb3cb344c12922e0")
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_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>")
set(EP_voamrwbenc_DEPENDENCIES EP_opencoreamr)
endif()
......@@ -20,47 +20,61 @@
#
############################################################################
set(EP_vpx_URL "http://webm.googlecode.com/files/libvpx-v1.3.0.tar.bz2")
set(EP_vpx_URL_HASH "MD5=14783a148872f2d08629ff7c694eb31f")
set(EP_vpx_BUILD_METHOD "autotools")
set(EP_vpx_CONFIG_H_FILE vpx_config.h)
set(EP_vpx_CONFIGURE_OPTIONS
"--enable-error-concealment"
"--enable-realtime-only"
"--enable-spatial-resampling"
"--enable-vp8"
"--disable-vp9"
"--enable-libs"
"--disable-install-docs"
"--disable-debug-libs"
"--disable-examples"
"--disable-unit-tests"
"--as=yasm"
)
if(WIN32)
set(EP_vpx_PATCH_COMMAND "${PATCH_PROGRAM}" "-p1" "-i" "${CMAKE_CURRENT_SOURCE_DIR}/builders/vpx/enable-shared-on-windows.patch" "--binary")
set(EP_vpx_TARGET "x86-win32-gcc")
set(EP_vpx_LINKING_TYPE "--disable-static" "--enable-shared")
elseif(APPLE)
if(CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
set(EP_vpx_TARGET "x86_64-darwin10-gcc")
else()
set(EP_vpx_TARGET "x86-darwin10-gcc")
if(LINPHONE_BUILDER_PREBUILT_URL)
set(EP_vpx_FILENAME "vpx-v1.3.0-${LINPHONE_BUILDER_ARCHITECTURE}.zip")
file(DOWNLOAD "${LINPHONE_BUILDER_PREBUILT_URL}/${EP_vpx_FILENAME}" "${CMAKE_CURRENT_BINARY_DIR}/${EP_vpx_FILENAME}" STATUS EP_vpx_FILENAME_STATUS)
list(GET EP_vpx_FILENAME_STATUS 0 EP_vpx_DOWNLOAD_STATUS)
if(NOT EP_vpx_DOWNLOAD_STATUS)
set(EP_vpx_PREBUILT 1)
endif()
set(EP_vpx_LINKING_TYPE "--enable-static" "--disable-shared" "--enable-pic")
set(EP_vpx_BUILD_IN_SOURCE "yes")
endif()
if(EP_vpx_PREBUILT)
set(EP_vpx_URL "${CMAKE_CURRENT_BINARY_DIR}/${EP_vpx_FILENAME}")
set(EP_vpx_BUILD_METHOD "prebuilt")
else()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(EP_vpx_TARGET "x86_64-linux-gcc")
set(EP_vpx_URL "http://webm.googlecode.com/files/libvpx-v1.3.0.tar.bz2")
set(EP_vpx_URL_HASH "MD5=14783a148872f2d08629ff7c694eb31f")
set(EP_vpx_BUILD_METHOD "autotools")
set(EP_vpx_CONFIG_H_FILE vpx_config.h)
set(EP_vpx_CONFIGURE_OPTIONS
"--enable-error-concealment"
"--enable-realtime-only"
"--enable-spatial-resampling"
"--enable-vp8"
"--disable-vp9"
"--enable-libs"
"--disable-install-docs"
"--disable-debug-libs"
"--disable-examples"
"--disable-unit-tests"
"--as=yasm"
)
if(WIN32)
set(EP_vpx_PATCH_COMMAND "${PATCH_PROGRAM}" "-p1" "-i" "${CMAKE_CURRENT_SOURCE_DIR}/builders/vpx/enable-shared-on-windows.patch" "--binary")
set(EP_vpx_TARGET "x86-win32-gcc")
set(EP_vpx_LINKING_TYPE "--disable-static" "--enable-shared")
elseif(APPLE)
if(CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
set(EP_vpx_TARGET "x86_64-darwin10-gcc")
else()
set(EP_vpx_TARGET "x86-darwin10-gcc")
endif()
set(EP_vpx_LINKING_TYPE "--enable-static" "--disable-shared" "--enable-pic")
set(EP_vpx_BUILD_IN_SOURCE "yes")
else()
set(EP_vpx_TARGET "x86-linux-gcc")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(EP_vpx_TARGET "x86_64-linux-gcc")
else()
set(EP_vpx_TARGET "x86-linux-gcc")
endif()
set(EP_vpx_LINKING_TYPE "--disable-static" "--enable-shared")
endif()
set(EP_vpx_LINKING_TYPE "--disable-static" "--enable-shared")
endif()
set(EP_vpx_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--target=${EP_vpx_TARGET}"
)
set(EP_vpx_CONFIGURE_ENV "LD=$CC")
set(EP_vpx_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--target=${EP_vpx_TARGET}"
)
set(EP_vpx_CONFIGURE_ENV "LD=$CC")
endif()
......@@ -20,29 +20,43 @@
#
############################################################################
set(EP_xml2_GIT_REPOSITORY "git://git.gnome.org/libxml2")
set(EP_xml2_GIT_TAG "v2.8.0")
set(EP_xml2_BUILD_METHOD "autotools")
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_HOST}"
)
set(EP_xml2_CONFIGURE_OPTIONS
"--with-minimum"
"--with-xpath"
"--with-tree"
"--with-schemas"
"--with-reader"
"--with-writer"
"--with-sax1"
"--without-lzma"
"--without-zlib"
"--enable-rebuild-docs=no"
)
set(EP_xml2_LINKING_TYPE "--disable-static" "--enable-shared")
if(LINPHONE_BUILDER_PREBUILT_URL)
set(EP_xml2_FILENAME "xml2-v2.8.0-${LINPHONE_BUILDER_ARCHITECTURE}.zip")
file(DOWNLOAD "${LINPHONE_BUILDER_PREBUILT_URL}/${EP_xml2_FILENAME}" "${CMAKE_CURRENT_BINARY_DIR}/${EP_xml2_FILENAME}" STATUS EP_xml2_FILENAME_STATUS)
list(GET EP_xml2_FILENAME_STATUS 0 EP_xml2_DOWNLOAD_STATUS)
if(NOT EP_xml2_DOWNLOAD_STATUS)
set(EP_xml2_PREBUILT 1)
endif()
endif()
if(EP_xml2_PREBUILT)
set(EP_xml2_URL "${CMAKE_CURRENT_BINARY_DIR}/${EP_xml2_FILENAME}")
set(EP_xml2_BUILD_METHOD "prebuilt")
else()
set(EP_xml2_GIT_REPOSITORY "git://git.gnome.org/libxml2")
set(EP_xml2_GIT_TAG "v2.8.0")
set(EP_xml2_BUILD_METHOD "autotools")
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_HOST}"
)
set(EP_xml2_CONFIGURE_OPTIONS
"--with-minimum"
"--with-xpath"
"--with-tree"
"--with-schemas"
"--with-reader"
"--with-writer"
"--with-sax1"
"--without-lzma"
"--without-zlib"
"--enable-rebuild-docs=no"
)
set(EP_xml2_LINKING_TYPE "--disable-static" "--enable-shared")
if(WIN32)
set(EP_xml2_EXTRA_LDFLAGS "-static-libgcc")
if(WIN32)
set(EP_xml2_EXTRA_LDFLAGS "-static-libgcc")
endif()
endif()
......@@ -26,6 +26,12 @@ set(ep_base ${LINPHONE_BUILDER_WORK_DIR})
set_property(DIRECTORY PROPERTY EP_BASE ${ep_base})
# Define the architecture. It will be used to generate the URL to get prebuilt dependencies.
if(WIN32)
set(LINPHONE_BUILDER_ARCHITECTURE "Win32")
endif()
if(${CMAKE_VERBOSE_MAKEFILE})
set(AUTOTOOLS_VERBOSE_MAKEFILE 1)
else(${CMAKE_VERBOSE_MAKEFILE})
......@@ -466,7 +472,14 @@ function(linphone_builder_add_project PROJNAME)
linphone_builder_apply_extra_flags(${PROJNAME})
linphone_builder_expand_external_project_vars()
if("${EP_${PROJNAME}_BUILD_METHOD}" STREQUAL "custom")
if("${EP_${PROJNAME}_BUILD_METHOD}" STREQUAL "prebuilt")
message("Using prebuilt ${PROJNAME}")
set(BUILD_COMMANDS
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E echo ""
BUILD_COMMAND ${CMAKE_COMMAND} -E echo ""
INSTALL_COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=<SOURCE_DIR> -DINSTALL_DIR=${CMAKE_INSTALL_PREFIX} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/install_prebuilt.cmake
)
elseif("${EP_${PROJNAME}_BUILD_METHOD}" STREQUAL "custom")
set(ep_redirect_to_file "2>&1 >> ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}.log")
configure_file(${EP_${PROJNAME}_CONFIGURE_COMMAND_SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_configure.sh)
configure_file(${EP_${PROJNAME}_BUILD_COMMAND_SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_build.sh)
......
############################################################################
# install_prebuilt.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.
#
############################################################################
file(GLOB_RECURSE FILES_TO_INSTALL RELATIVE ${SOURCE_DIR} "${SOURCE_DIR}/*")
foreach(FILE_TO_INSTALL ${FILES_TO_INSTALL})
get_filename_component(INSTALL_SUBDIR ${FILE_TO_INSTALL} DIRECTORY)
file(MAKE_DIRECTORY ${INSTALL_SUBDIR})
file(COPY ${SOURCE_DIR}/${FILE_TO_INSTALL} DESTINATION ${INSTALL_DIR}/${INSTALL_SUBDIR})
endforeach()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment