voamrwbenc.cmake 2.11 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
############################################################################
# voamrwbenc.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
19
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20 21 22
#
############################################################################

23
if(LINPHONE_BUILDER_PREBUILT_URL)
24 25 26 27 28
	set(VOAMRWBENC_FILENAME "voamrwbenc-0.1.3-${LINPHONE_BUILDER_ARCHITECTURE}.zip")
	file(DOWNLOAD "${LINPHONE_BUILDER_PREBUILT_URL}/${VOAMRWBENC_FILENAME}" "${CMAKE_CURRENT_BINARY_DIR}/${VOAMRWBENC_FILENAME}" STATUS VOAMRWBENC_FILENAME_STATUS)
	list(GET VOAMRWBENC_FILENAME_STATUS 0 VOAMRWBENC_DOWNLOAD_STATUS)
	if(NOT VOAMRWBENC_DOWNLOAD_STATUS)
		set(VOAMRWBENC_PREBUILT 1)
29 30 31
	endif()
endif()

32 33 34
if(VOAMRWBENC_PREBUILT)
	lcb_url("${CMAKE_CURRENT_BINARY_DIR}/${VOAMRWBENC_FILENAME}")
	lcb_build_method("prebuilt")
35
else()
36 37
	lcb_url("http://downloads.sourceforge.net/project/opencore-amr/vo-amrwbenc/vo-amrwbenc-0.1.3.tar.gz")
	lcb_url_hash("MD5=f63bb92bde0b1583cb3cb344c12922e0")
38
	lcb_external_source_paths("externals/vo-amrwbenc" "vo-amrwbenc" "external/vo-amrwbenc")
39
	lcb_ignore_warnings(YES)
Ghislain MARY's avatar
Ghislain MARY committed
40

41 42 43
	lcb_dependencies("opencoreamr")

	lcb_linking_type("-DENABLE_STATIC=YES")
44 45

	if(ANDROID)
46
		if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7-a")
47
			lcb_cmake_options("-DENABLE_ARMV7NEON=YES")
48
		elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "armeabi")
49
			lcb_cmake_options("-DENABLE_ARMV5E=YES")
50 51
		endif()
	endif()
52
endif()