vpx.cmake 2.29 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
############################################################################
# vpx.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.
#
############################################################################

23
set(EP_vpx_URL "http://webm.googlecode.com/files/libvpx-v1.3.0.tar.bz2")
24
set(EP_vpx_URL_HASH "MD5=14783a148872f2d08629ff7c694eb31f")
25
set(EP_vpx_BUILD_METHOD "autotools")
26
set(EP_vpx_CONFIG_H_FILE vpx_config.h)
27 28 29 30 31 32 33 34 35 36 37 38
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"
)
Ghislain MARY's avatar
Ghislain MARY committed
39

40 41
if(WIN32)
	set(EP_vpx_PATCH_COMMAND "${PATCH_PROGRAM}" "-p1" "-i" "${CMAKE_CURRENT_SOURCE_DIR}/builders/vpx/enable-shared-on-windows.patch")
42 43 44
	set(EP_vpx_TARGET "x86-win32-gcc")
	set(EP_vpx_LINKING_TYPE "--disable-static" "--enable-shared")
elseif(APPLE)
45 46 47 48 49
	if(CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
		set(EP_vpx_TARGET "x86_64-darwin10-gcc")
	else()
		set(EP_vpx_TARGET "x86-darwin10-gcc")
	endif()
50
	set(EP_vpx_LINKING_TYPE "--enable-static" "--disable-shared --enable-pic")
51
	set(EP_vpx_BUILD_IN_SOURCE "yes")
52
else()
53 54 55 56 57
	if(CMAKE_SIZEOF_VOID_P EQUAL 8)
		set(EP_vpx_TARGET "x86_64-linux-gcc")
	else()
		set(EP_vpx_TARGET "x86-linux-gcc")
	endif()
58
	set(EP_vpx_LINKING_TYPE "--disable-static" "--enable-shared")
59
endif()
60 61 62 63 64

set(EP_vpx_CROSS_COMPILATION_OPTIONS
	"--prefix=${CMAKE_INSTALL_PREFIX}"
	"--target=${EP_vpx_TARGET}"
)
65
set(EP_vpx_CONFIGURE_ENV "LD=$CC")