Commit 28fedb21 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Separate the definition of linking type from the cmake/configure options to...

Separate the definition of linking type from the cmake/configure options to ease the writing of configurations + Build some libraries statically by default.
parent fd98244e
......@@ -23,3 +23,4 @@
set(EP_antlr3c_GIT_REPOSITORY "git://git.linphone.org/antlr3.git")
set(EP_antlr3c_GIT_TAG "c2a2df0abc72e0611dd068c93731b3561b7c713c") # Branch 'linphone'
set(EP_antlr3c_CMAKE_OPTIONS "-DENABLE_DEBUGGER=0")
set(EP_antlr3c_LINKING_TYPE "-DENABLE_STATIC=1")
......@@ -23,6 +23,7 @@
set(EP_bellesip_GIT_REPOSITORY "git://git.linphone.org/belle-sip.git")
set(EP_bellesip_GIT_TAG "41ffa88e4098ec5677ec33526e1bb9274b62ee67") # Branch 'master'
set(EP_bellesip_CMAKE_OPTIONS )
set(EP_bellesip_LINKING_TYPE "-DENABLE_STATIC=0")
set(EP_bellesip_DEPENDENCIES EP_antlr3c EP_polarssl)
if(${ENABLE_UNIT_TESTS})
......
......@@ -23,3 +23,4 @@
set(EP_cunit_GIT_REPOSITORY "git://git.linphone.org/cunit.git")
set(EP_cunit_GIT_TAG "86562ef04d0d66c007d7822944a75f540ae37f19") # Branch 'linphone'
set(EP_cunit_CMAKE_OPTIONS "-DENABLE_AUTOMATED=0" "-DENABLE_CONSOLE=0")
set(EP_cunit_LINKING_TYPE "-DENABLE_STATIC=1")
......@@ -24,6 +24,7 @@ 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_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_CONFIGURE_OPTIONS@
@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@
fi
......@@ -23,3 +23,4 @@
set(EP_gsm_GIT_REPOSITORY "git://git.linphone.org/gsm.git")
set(EP_gsm_GIT_TAG "8729c98e098341582e9c9f00e56b74f7e53e1034") # Branch 'linphone'
set(EP_gsm_PATCH_COMMAND "${CMAKE_COMMAND}" "-E" "copy" "${CMAKE_CURRENT_SOURCE_DIR}/builders/gsm/CMakeLists.txt" "<SOURCE_DIR>")
set(EP_gsm_LINKING_TYPE "-DENABLE_STATIC=1")
......@@ -23,6 +23,10 @@
cmake_minimum_required(VERSION 2.6)
project(GSM C)
option(ENABLE_STATIC "Build static library (default is shared library)." OFF)
include_directories(
inc/
)
......@@ -48,7 +52,19 @@ set(GSM_SOURCE_FILES
src/table.c
)
add_library(gsm SHARED ${GSM_SOURCE_FILES})
if(${ENABLE_STATIC})
add_library(gsm STATIC ${GSM_SOURCE_FILES})
else(${ENABLE_STATIC})
add_library(gsm SHARED ${GSM_SOURCE_FILES})
if(MSVC)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/gsm.pdb
DESTINATION bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
endif(MSVC)
endif(${ENABLE_STATIC})
install(TARGETS gsm
RUNTIME DESTINATION bin
......
......@@ -24,6 +24,7 @@ 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_DEPENDENCIES EP_bellesip EP_ortp EP_ms2 EP_xml2)
if(${ENABLE_ZRTP})
......
......@@ -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_CONFIGURE_OPTIONS@
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--host=@LINPHONE_BUILDER_TOOLCHAIN_HOST@" @EP_linphone_LINKING_TYPE@ @EP_linphone_CONFIGURE_OPTIONS@
fi
......@@ -24,6 +24,7 @@ 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_DEPENDENCIES EP_ortp)
if(${ENABLE_GSM})
......
......@@ -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_CONFIGURE_OPTIONS@
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--host=@LINPHONE_BUILDER_TOOLCHAIN_HOST@" @EP_ms2_LINKING_TYPE@ @EP_ms2_CONFIGURE_OPTIONS@
fi
......@@ -24,3 +24,4 @@ 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")
......@@ -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_CONFIGURE_OPTIONS@
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--host=@LINPHONE_BUILDER_TOOLCHAIN_HOST@" @EP_opus_LINKING_TYPE@ @EP_opus_CONFIGURE_OPTIONS@
fi
......@@ -24,6 +24,7 @@ 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_DEPENDENCIES )
if(${ENABLE_SRTP})
......
......@@ -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_CONFIGURE_OPTIONS@
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--host=@LINPHONE_BUILDER_TOOLCHAIN_HOST@" @EP_ortp_LINKING_TYPE@ @EP_ortp_CONFIGURE_OPTIONS@
fi
......@@ -22,3 +22,4 @@
set(EP_polarssl_GIT_REPOSITORY "git://git.linphone.org/polarssl.git")
set(EP_polarssl_GIT_TAG "3681900a1e0a3a8c77fc33c545cccd93977a1cf2") # Branch 'linphone'
set(EP_polarssl_LINKING_TYPE "-DUSE_SHARED_POLARSSL_LIBRARY=0")
......@@ -22,3 +22,4 @@
set(EP_speex_GIT_REPOSITORY "git://git.linphone.org/speex.git")
set(EP_speex_GIT_TAG "302ce26e309efb1b4a4b7b6ea4807375d157258f") # Branch 'linphone'
set(EP_speex_LINKING_TYPE "-DENABLE_STATIC=1")
......@@ -22,3 +22,4 @@
set(EP_srtp_GIT_REPOSITORY "git://git.linphone.org/srtp.git")
set(EP_srtp_GIT_TAG "da2ece56f18d35a12f0fee5dcb99e03ff15864de") # Branch 'master'
set(EP_srtp_LINKING_TYPE "-DENABLE_STATIC=1")
......@@ -23,3 +23,4 @@
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")
......@@ -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_CONFIGURE_OPTIONS@
@ep_source@/configure "--prefix=@CMAKE_INSTALL_PREFIX@" "--host=@LINPHONE_BUILDER_TOOLCHAIN_HOST@" @EP_v4l_LINKING_TYPE@ @EP_v4l_CONFIGURE_OPTIONS@
fi
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