Commit 77ec99c7 authored by Ghislain MARY's avatar Ghislain MARY

Clean definitions of configure options.

parent cccb63c7
......@@ -22,9 +22,27 @@
set(EP_ffmpeg_URL "http://ffmpeg.org/releases/ffmpeg-0.10.2.tar.gz")
set(EP_ffmpeg_AUTOTOOLS "yes")
# Disable video acceleration support for compatibility with older Mac OS X versions (vda, vaapi, vdpau).
set(EP_ffmpeg_CONFIGURE_OPTIONS "--enable-pic --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-vda --disable-vaapi --disable-vdpau")
set(EP_ffmpeg_LINKING_TYPE "--disable-static --enable-shared")
set(EP_ffmpeg_CONFIGURE_OPTIONS
"--enable-pic"
"--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"
)
set(EP_ffmpeg_LINKING_TYPE "--disable-static" "--enable-shared")
set(EP_ffmpeg_PATCH_COMMAND "patch" "-p1" "<" "${CMAKE_CURRENT_SOURCE_DIR}/builders/ffmpeg/no-sdl.patch")
set(EP_ffmpeg_ARCH "i386")
......
......@@ -20,5 +20,5 @@ cd @ep_build@
if [ ! -f config.h ]
then
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--arch=${EP_ffmpeg_ARCH}" "--target-os=${EP_ffmpeg_TARGET_OS}" @EP_ffmpeg_LINKING_TYPE@ @EP_ffmpeg_CONFIGURE_OPTIONS@
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--arch=${EP_ffmpeg_ARCH}" "--target-os=${EP_ffmpeg_TARGET_OS}" @ep_ffmpeg_config_options@
fi
......@@ -23,18 +23,23 @@
set(EP_linphone_GIT_REPOSITORY "git://git.linphone.org/linphone.git")
set(EP_linphone_GIT_TAG "779e104f4f912963069b1a5137518c1cb1334671") # Branch 'master'
set(EP_linphone_AUTOTOOLS "yes")
set(EP_linphone_CONFIGURE_OPTIONS "--disable-strict --enable-bellesip --enable-external-ortp --enable-external-mediastreamer")
set(EP_linphone_LINKING_TYPE "--disable-static --enable-shared")
set(EP_linphone_CONFIGURE_OPTIONS
"--disable-strict"
"--enable-bellesip"
"--enable-external-ortp"
"--enable-external-mediastreamer"
)
set(EP_linphone_LINKING_TYPE "--disable-static" "--enable-shared")
set(EP_linphone_DEPENDENCIES EP_bellesip EP_ortp EP_ms2 EP_xml2)
if(${ENABLE_ZRTP})
# TODO
else(${ENABLE_ZRTP})
set(EP_linphone_CONFIGURE_OPTIONS "${EP_linphone_CONFIGURE_OPTIONS} --disable-zrtp")
list(APPEND EP_linphone_CONFIGURE_OPTIONS "--disable-zrtp")
endif(${ENABLE_ZRTP})
if(${ENABLE_UNIT_TESTS})
list(APPEND EP_linphone_DEPENDENCIES EP_cunit)
else(${ENABLE_UNIT_TESTS})
set(EP_linphone_CONFIGURE_OPTIONS "${EP_linphone_CONFIGURE_OPTIONS} --disable-tests")
list(APPEND EP_linphone_CONFIGURE_OPTIONS "--disable-tests")
endif(${ENABLE_UNIT_TESTS})
......@@ -21,5 +21,5 @@ cd @ep_build@
if [ ! -f config.h ]
then
@ep_source@/autogen.sh
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--host=@LINPHONE_BUILDER_TOOLCHAIN_HOST@" @EP_linphone_LINKING_TYPE@ @EP_linphone_CONFIGURE_OPTIONS@
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--host=@LINPHONE_BUILDER_TOOLCHAIN_HOST@" @ep_linphone_config_options@
fi
......@@ -23,39 +23,42 @@
set(EP_ms2_GIT_REPOSITORY "git://git.linphone.org/mediastreamer2.git")
set(EP_ms2_GIT_TAG "77b6e16c9ef07fdbb741d220c89e749ff746d654") # Branch 'master'
set(EP_ms2_AUTOTOOLS "yes")
set(EP_ms2_CONFIGURE_OPTIONS "--disable-strict --enable-external-ortp")
set(EP_ms2_LINKING_TYPE "--disable-static --enable-shared")
set(EP_ms2_CONFIGURE_OPTIONS
"--disable-strict"
"--enable-external-ortp"
)
set(EP_ms2_LINKING_TYPE "--disable-static" "--enable-shared")
set(EP_ms2_DEPENDENCIES EP_ortp)
if(${ENABLE_GSM})
set(EP_ms2_CONFIGURE_OPTIONS "${EP_ms2_CONFIGURE_OPTIONS} --with-gsm=${CMAKE_INSTALL_PREFIX}")
list(APPEND EP_ms2_CONFIGURE_OPTIONS "--with-gsm=${CMAKE_INSTALL_PREFIX}")
list(APPEND EP_ms2_DEPENDENCIES EP_gsm)
else(${ENABLE_GSM})
set(EP_ms2_CONFIGURE_OPTIONS "${EP_ms2_CONFIGURE_OPTIONS} --disable-gsm")
list(APPEND EP_ms2_CONFIGURE_OPTIONS "--disable-gsm")
endif(${ENABLE_GSM})
if(${ENABLE_OPUS})
list(APPEND EP_ms2_DEPENDENCIES EP_opus)
else(${ENABLE_OPUS})
set(EP_ms2_CONFIGURE_OPTIONS "${EP_ms2_CONFIGURE_OPTIONS} --disable-opus")
list(APPEND EP_ms2_CONFIGURE_OPTIONS "--disable-opus")
endif(${ENABLE_OPUS})
if(${ENABLE_SPEEX})
list(APPEND EP_ms2_DEPENDENCIES EP_speex)
else(${ENABLE_SPEEX})
set(EP_ms2_CONFIGURE_OPTIONS "${EP_ms2_CONFIGURE_OPTIONS} --disable-speex")
list(APPEND EP_ms2_CONFIGURE_OPTIONS "--disable-speex")
endif(${ENABLE_SPEEX})
if(${ENABLE_FFMPEG})
list(APPEND EP_ms2_DEPENDENCIES EP_ffmpeg)
else(${ENABLE_FFMPEG})
set(EP_ms2_CONFIGURE_OPTIONS "${EP_ms2_CONFIGURE_OPTIONS} --disable-ffmpeg")
list(APPEND EP_ms2_CONFIGURE_OPTIONS "--disable-ffmpeg")
endif(${ENABLE_FFMPEG})
if(${ENABLE_VPX})
list(APPEND EP_ms2_DEPENDENCIES EP_vpx)
else(${ENABLE_VPX})
set(EP_ms2_CONFIGURE_OPTIONS "${EP_ms2_CONFIGURE_OPTIONS} --disable-vp8")
list(APPEND EP_ms2_CONFIGURE_OPTIONS "--disable-vp8")
endif(${ENABLE_VPX})
if("${BUILD_V4L}" STREQUAL "yes")
......@@ -65,5 +68,5 @@ endif("${BUILD_V4L}" STREQUAL "yes")
if(${ENABLE_UNIT_TESTS})
list(APPEND EP_ms2_DEPENDENCIES EP_cunit)
else(${ENABLE_UNIT_TESTS})
set(EP_ms2_CONFIGURE_OPTIONS "${EP_ms2_CONFIGURE_OPTIONS} --disable-tests")
list(APPEND EP_ms2_CONFIGURE_OPTIONS "--disable-tests")
endif(${ENABLE_UNIT_TESTS})
......@@ -21,5 +21,5 @@ cd @ep_build@
if [ ! -f mediastreamer-config.h ]
then
@ep_source@/autogen.sh
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--host=@LINPHONE_BUILDER_TOOLCHAIN_HOST@" @EP_ms2_LINKING_TYPE@ @EP_ms2_CONFIGURE_OPTIONS@
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--host=@LINPHONE_BUILDER_TOOLCHAIN_HOST@" @ep_ms2_config_options@
fi
......@@ -23,5 +23,8 @@
set(EP_opus_GIT_REPOSITORY "git://git.opus-codec.org/opus.git")
set(EP_opus_GIT_TAG "v1.0.3")
set(EP_opus_AUTOTOOLS "yes")
set(EP_opus_CONFIGURE_OPTIONS "--disable-extra-programs --disable-doc")
set(EP_opus_LINKING_TYPE "--enable-static --disable-shared")
set(EP_opus_CONFIGURE_OPTIONS
"--disable-extra-programs"
"--disable-doc"
)
set(EP_opus_LINKING_TYPE "--enable-static" "--disable-shared")
......@@ -21,5 +21,5 @@ cd @ep_build@
if [ ! -f config.h ]
then
@ep_source@/autogen.sh
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--host=@LINPHONE_BUILDER_TOOLCHAIN_HOST@" @EP_opus_LINKING_TYPE@ @EP_opus_CONFIGURE_OPTIONS@
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--host=@LINPHONE_BUILDER_TOOLCHAIN_HOST@" @ep_opus_config_options@
fi
......@@ -23,17 +23,19 @@
set(EP_ortp_GIT_REPOSITORY "git://git.linphone.org/ortp.git")
set(EP_ortp_GIT_TAG "e33c53dfaa387aa77f037a33e8b3b3104b8f852a") # Branch 'master'
set(EP_ortp_AUTOTOOLS "yes")
set(EP_ortp_CONFIGURE_OPTIONS "--disable-strict")
set(EP_ortp_LINKING_TYPE "--disable-static --enable-shared")
set(EP_ortp_CONFIGURE_OPTIONS
"--disable-strict"
)
set(EP_ortp_LINKING_TYPE "--disable-static" "--enable-shared")
set(EP_ortp_DEPENDENCIES )
if(${ENABLE_SRTP})
set(EP_ortp_CONFIGURE_OPTIONS "${EP_ortp_CONFIGURE_OPTIONS} --with-srtp=${CMAKE_INSTALL_PREFIX}")
list(APPEND EP_ortp_CONFIGURE_OPTIONS "--with-srtp=${CMAKE_INSTALL_PREFIX}")
list(APPEND EP_ortp_DEPENDENCIES EP_srtp)
endif(${ENABLE_SRTP})
if(${ENABLE_ZRTP})
# TODO
else(${ENABLE_ZRTP})
set(EP_ortp_CONFIGURE_OPTIONS "${EP_ortp_CONFIGURE_OPTIONS} --disable-zrtp")
list(APPEND EP_ortp_CONFIGURE_OPTIONS "--disable-zrtp")
endif(${ENABLE_ZRTP})
......@@ -21,5 +21,5 @@ cd @ep_build@
if [ ! -f ortp-config.h ]
then
@ep_source@/autogen.sh
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--host=@LINPHONE_BUILDER_TOOLCHAIN_HOST@" @EP_ortp_LINKING_TYPE@ @EP_ortp_CONFIGURE_OPTIONS@
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--host=@LINPHONE_BUILDER_TOOLCHAIN_HOST@" @ep_ortp_config_options@
fi
......@@ -22,5 +22,10 @@
set(EP_v4l_URL "http://linuxtv.org/downloads/v4l-utils/v4l-utils-1.0.0.tar.bz2")
set(EP_v4l_AUTOTOOLS "yes")
set(EP_v4l_CONFIGURE_OPTIONS "--disable-v4l-utils --disable-libdvbv5 --with-udevdir=${CMAKE_INSTALL_PREFIX}/etc --without-jpeg")
set(EP_v4l_LINKING_TYPE "--disable-static --enable-shared")
set(EP_v4l_CONFIGURE_OPTIONS
"--disable-v4l-utils"
"--disable-libdvbv5"
"--with-udevdir=${CMAKE_INSTALL_PREFIX}/etc"
"--without-jpeg"
)
set(EP_v4l_LINKING_TYPE "--disable-static" "--enable-shared")
......@@ -20,5 +20,5 @@ cd @ep_build@
if [ ! -f config.h ]
then
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--host=@LINPHONE_BUILDER_TOOLCHAIN_HOST@" @EP_v4l_LINKING_TYPE@ @EP_v4l_CONFIGURE_OPTIONS@
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--host=@LINPHONE_BUILDER_TOOLCHAIN_HOST@" @ep_v4l_config_options@
fi
......@@ -23,8 +23,20 @@
set(EP_vpx_GIT_REPOSITORY "https://chromium.googlesource.com/webm/libvpx")
set(EP_vpx_GIT_TAG "v1.3.0")
set(EP_vpx_AUTOTOOLS "yes")
set(EP_vpx_CONFIGURE_OPTIONS "--enable-pic --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")
set(EP_vpx_LINKING_TYPE "--enable-static --disable-shared")
set(EP_vpx_CONFIGURE_OPTIONS
"--enable-pic"
"--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"
)
set(EP_vpx_LINKING_TYPE "--enable-static" "--disable-shared")
if(APPLE)
set(EP_vpx_TARGET "x86-darwin10-gcc")
......
......@@ -20,5 +20,5 @@ cd @ep_build@
if [ ! -f config.h ]
then
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--target=${EP_vpx_TARGET}" @EP_vpx_LINKING_TYPE@ @EP_vpx_CONFIGURE_OPTIONS@
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--target=${EP_vpx_TARGET}" @ep_vpx_config_options@
fi
......@@ -23,5 +23,13 @@
set(EP_xml2_GIT_REPOSITORY "git://git.gnome.org/libxml2")
set(EP_xml2_GIT_TAG "v2.8.0")
set(EP_xml2_AUTOTOOLS "yes")
set(EP_xml2_CONFIGURE_OPTIONS "--with-minimum --with-xpath --with-tree --with-schemas --with-reader --with-writer --enable-rebuild-docs=no")
set(EP_xml2_LINKING_TYPE "--enable-static --disable-shared")
set(EP_xml2_CONFIGURE_OPTIONS
"--with-minimum"
"--with-xpath"
"--with-tree"
"--with-schemas"
"--with-reader"
"--with-writer"
"--enable-rebuild-docs=no"
)
set(EP_xml2_LINKING_TYPE "--enable-static" "--disable-shared")
......@@ -20,5 +20,5 @@ cd @ep_build@
if [ ! -f config.h ]
then
@ep_source@/autogen.sh "--prefix=@CMAKE_INSTALL_PREFIX@" "--host=@LINPHONE_BUILDER_TOOLCHAIN_HOST@" @EP_xml2_LINKING_TYPE@ @EP_xml2_CONFIGURE_OPTIONS@
@ep_source@/autogen.sh "--prefix=@CMAKE_INSTALL_PREFIX@" "--host=@LINPHONE_BUILDER_TOOLCHAIN_HOST@" @ep_xml2_config_options@
fi
......@@ -139,6 +139,13 @@ macro(linphone_builder_apply_toolchain_flags)
endmacro(linphone_builder_apply_toolchain_flags)
macro(linphone_builder_apply_config_options PROJNAME)
foreach(OPTION ${EP_${PROJNAME}_LINKING_TYPE} ${EP_${PROJNAME}_CONFIGURE_OPTIONS})
set(ep_${PROJNAME}_config_options "${ep_${PROJNAME}_config_options} \"${OPTION}\"")
endforeach(OPTION)
endmacro(linphone_builder_apply_config_options)
macro(linphone_builder_apply_extra_flags EXTRA_CFLAGS EXTRA_CXXFLAGS EXTRA_LDFLAGS)
foreach(BUILD_CONFIG "" "_DEBUG" "_MINSIZEREL" "_RELEASE" "_RELWITHDEBINFO")
if(NOT "${EXTRA_CFLAGS}" STREQUAL "")
......@@ -167,12 +174,14 @@ macro(linphone_builder_set_ep_directories PROJNAME)
endif()
endmacro(linphone_builder_set_ep_directories)
macro(linphone_builder_add_project PROJNAME)
function(linphone_builder_add_project PROJNAME)
linphone_builder_set_ep_directories(${PROJNAME})
linphone_builder_apply_extra_flags("${EP_${PROJNAME}_EXTRA_CFLAGS}" "${EP_${PROJNAME}_EXTRA_CXXFLAGS}" "${EP_${PROJNAME}_EXTRA_LDFLAGS}")
linphone_builder_expand_external_project_vars()
if("${EP_${PROJNAME}_AUTOTOOLS}" STREQUAL "yes")
linphone_builder_apply_config_options(${PROJNAME})
if(MSVC)
set(SCRIPT_EXTENSION bat)
set(MSVC_PROJNAME ${PROJNAME})
......@@ -216,10 +225,10 @@ macro(linphone_builder_add_project PROJNAME)
CMAKE_GENERATOR ${CMAKE_GENERATOR}
${BUILD_COMMANDS}
)
endmacro(linphone_builder_add_project)
endfunction(linphone_builder_add_project)
macro(linphone_builder_add_external_projects)
function(linphone_builder_add_external_projects)
foreach(BUILDER ${LINPHONE_BUILDER_BUILDERS})
linphone_builder_add_project(${BUILDER})
endforeach(BUILDER)
endmacro(linphone_builder_add_external_projects)
endfunction(linphone_builder_add_external_projects)
......@@ -48,7 +48,28 @@ include(builders/CMakeLists.txt)
set(EP_bellesip_EXTRA_CFLAGS "-DUSE_STRUCT_RES_STATE_NAMESERVERS ${EP_bellesip_EXTRA_CFLAGS}")
# mediastreamer2
set(EP_ms2_CONFIGURE_OPTIONS "${EP_ms2_CONFIGURE_OPTIONS} --disable-nls --disable-theora --disable-sdl --disable-x11 --disable-video --disable-alsa --enable-qsa --enable-relativeprefix=yes")
list(APPEND EP_ms2_CONFIGURE_OPTIONS
"--disable-nls"
"--disable-theora"
"--disable-sdl"
"--disable-x11"
"--disable-video"
"--disable-alsa"
"--enable-qsa"
"--enable-relativeprefix=yes"
)
# linphone
set(EP_linphone_CONFIGURE_OPTIONS "${EP_linphone_CONFIGURE_OPTIONS} --disable-nls --with-readline=none --enable-gtk_ui=no --enable-console_ui=yes --disable-x11 --disable-tutorials --disable-tools --disable-msg-storage --disable-video --disable-alsa --enable-relativeprefix=yes")
list(APPEND EP_linphone_CONFIGURE_OPTIONS
"--disable-nls"
"--with-readline=none"
"--enable-gtk_ui=no"
"--enable-console_ui=yes"
"--disable-x11"
"--disable-tutorials"
"--disable-tools"
"--disable-msg-storage"
"--disable-video"
"--disable-alsa"
"--enable-relativeprefix=yes"
)
......@@ -48,4 +48,4 @@ include(builders/CMakeLists.txt)
list(APPEND EP_cunit_CMAKE_OPTIONS "-DENABLE_CURSES=1")
# xml2
set(EP_xml2_CONFIGURE_OPTIONS "${EP_xml2_CONFIGURE_OPTIONS} --with-sax1")
list(APPEND EP_xml2_CONFIGURE_OPTIONS "--with-sax1")
......@@ -45,7 +45,23 @@ include(builders/CMakeLists.txt)
# mediastreamer2
set(EP_ms2_CONFIGURE_OPTIONS "${EP_ms2_CONFIGURE_OPTIONS} --disable-nls --disable-theora --disable-sdl --enable-x11=no --disable-glx --enable-relativeprefix=yes")
list(APPEND EP_ms2_CONFIGURE_OPTIONS
"--disable-nls"
"--disable-theora"
"--disable-sdl"
"--enable-x11=no"
"--disable-glx"
"--enable-relativeprefix=yes"
)
# linphone
set(EP_linphone_CONFIGURE_OPTIONS "${EP_linphone_CONFIGURE_OPTIONS} --disable-nls --with-readline=none --enable-gtk_ui=no --enable-console_ui=no --disable-tutorials --disable-tools --disable-msg-storage --enable-relativeprefix=yes")
list(APPEND EP_linphone_CONFIGURE_OPTIONS
"--disable-nls"
"--with-readline=none"
"--enable-gtk_ui=no"
"--enable-console_ui=no"
"--disable-tutorials"
"--disable-tools"
"--disable-msg-storage"
"--enable-relativeprefix=yes"
)
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