xml2.cmake 1.72 KB
Newer Older
1 2
############################################################################
# xml2.cmake
3
# Copyright (C) 2014-2018  Belledonne Communications, Grenoble France
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#
############################################################################
#
# 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(XML2_FILENAME "xml2-v2.8.0-${LINPHONE_BUILDER_ARCHITECTURE}.zip")
	file(DOWNLOAD "${LINPHONE_BUILDER_PREBUILT_URL}/${XML2_FILENAME}" "${CMAKE_CURRENT_BINARY_DIR}/${XML2_FILENAME}" STATUS XML2_FILENAME_STATUS)
	list(GET XML2_FILENAME_STATUS 0 XML2_DOWNLOAD_STATUS)
	if(NOT XML2_DOWNLOAD_STATUS)
		set(XML2_PREBUILT 1)
29 30 31
	endif()
endif()

32 33 34
if(XML2_PREBUILT)
	lcb_url("${CMAKE_CURRENT_BINARY_DIR}/${XML2_FILENAME}")
	lcb_build_method("prebuilt")
35
else()
36
	lcb_git_repository("https://gitlab.linphone.org/BC/public/external/libxml2")
37
	lcb_git_tag("v2.8.0")
38
	lcb_external_source_paths("libxml2" "xml2" "externals/libxml2" "external/libxml2")
39 40
	lcb_may_be_found_on_system(YES)
	lcb_ignore_warnings(YES)
Ghislain MARY's avatar
Ghislain MARY committed
41
endif()