A: ninja can make use of ccache out of the box B: ninja participates in the toplevel make job server The target architecture now comes from the compiler configure selected instead of the generator's -A. Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com> Change-Id: I86951768ae42a6684b80298ff149af6c8d8d7fb7 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10654 Reviewed-by: Noel Grandin <noel.grandin@collabora.com> Tested-by: Jenkins CPCI <releng@collaboraoffice.com> (cherry picked from commit 29fc77fea92e28dc007781d7f728b67f5b55c58b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210984 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
72 lines
2.8 KiB
Makefile
72 lines
2.8 KiB
Makefile
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
|
#
|
|
# This file is part of the LibreOffice project.
|
|
#
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
#
|
|
|
|
$(eval $(call gb_ExternalProject_ExternalProject,libxml2))
|
|
|
|
$(eval $(call gb_ExternalProject_register_targets,libxml2,\
|
|
build \
|
|
))
|
|
|
|
ifeq ($(OS),EMSCRIPTEN)
|
|
$(call gb_ExternalProject_use_external_project,libxml2,icu)
|
|
endif
|
|
|
|
ifeq ($(OS),WNT)
|
|
$(call gb_ExternalProject_use_external_project,libxml2,icu)
|
|
|
|
# remove VERSION file after the compilation, otherwise, libabw, libvisio,
|
|
# and probably other libraries fail to compile with
|
|
# workdir\UnpackedTarball\libxml2\version(1): error C2059: syntax error: 'constant
|
|
$(call gb_ExternalProject_get_state_target,libxml2,build):
|
|
$(call gb_Trace_StartRange,libxml2,EXTERNAL)
|
|
+$(call gb_ExternalProject_run,build,\
|
|
export INCLUDE="$(gb_ExternalProject_INCLUDE)" \
|
|
&& export LIB="$(ILIB)" \
|
|
&& $(CMAKE) . \
|
|
-G Ninja \
|
|
-DCMAKE_MAKE_PROGRAM=$(NINJA) \
|
|
-DCMAKE_BUILD_TYPE=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
|
|
-DCMAKE_C_COMPILER=$(lastword $(filter-out -%,$(CC))) \
|
|
$(if $(CCACHE),-DCMAKE_C_COMPILER_LAUNCHER=$(CCACHE)) \
|
|
-DLIBXML2_WITH_TESTS=OFF \
|
|
-DLIBXML2_WITH_ICONV=OFF \
|
|
-DLIBXML2_WITH_PYTHON=OFF \
|
|
-DLIBXML2_WITH_SAX1=ON \
|
|
-DLIBXML2_WITH_ICU=ON \
|
|
-DICU_INCLUDE_DIR=$(gb_UnpackedTarball_workdir)/icu/source/common/ \
|
|
-DICU_LIBRARY=$(gb_UnpackedTarball_workdir)/icu/source/lib/ \
|
|
$(if $(MSVC_USE_DEBUG_RUNTIME), \
|
|
-DICU_UC_LIBRARY_DEBUG=$(gb_UnpackedTarball_workdir)/icu/source/lib/icuucd.lib, \
|
|
-DICU_UC_LIBRARY_RELEASE=$(gb_UnpackedTarball_workdir)/icu/source/lib/icuuc.lib) \
|
|
&& $(CMAKE) --build . \
|
|
&& rm VERSION \
|
|
)
|
|
$(call gb_Trace_EndRange,libxml2,EXTERNAL)
|
|
else # OS!=WNT
|
|
$(call gb_ExternalProject_get_state_target,libxml2,build):
|
|
$(call gb_Trace_StartRange,libxml2,EXTERNAL)
|
|
$(call gb_ExternalProject_run,build,\
|
|
$(gb_RUN_CONFIGURE) ./configure --without-iconv --without-python --without-zlib --with-sax1 \
|
|
--without-lzma \
|
|
$(if $(debug),--with-debug) \
|
|
$(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
|
|
$(gb_CONFIGURE_PLATFORMS) \
|
|
$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________URELIB) \
|
|
LDFLAGS="$(LDFLAGS) $(call gb_ExternalProject_get_link_flags,libxml2) $(if $(SYSBASE),-L$(SYSBASE)/usr/lib)" \
|
|
CFLAGS="$(CFLAGS) \
|
|
$(if $(SYSBASE),-I$(SYSBASE)/usr/include) \
|
|
$(call gb_ExternalProject_get_build_flags,libxml2)" \
|
|
$(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \
|
|
&& $(MAKE) libxml2.la xmllint \
|
|
)
|
|
$(call gb_Trace_EndRange,libxml2,EXTERNAL)
|
|
endif
|
|
|
|
# vim: set noet sw=4 ts=4:
|