Bump version to 6.4-15
[LibreOffice.git] / external / cairo / ExternalProject_cairo.mk
blob3dac98fc43626c96a7bc280e80cefce9570ae1e2
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 $(eval $(call gb_ExternalProject_ExternalProject,cairo))
12 $(eval $(call gb_ExternalProject_use_external_project,cairo,pixman))
14 $(eval $(call gb_ExternalProject_use_externals,cairo,\
15 freetype \
16 libpng \
17 zlib \
20 ifeq ($(OS),ANDROID)
21 $(eval $(call gb_ExternalProject_use_unpacked,cairo,fontconfig))
22 $(eval $(call gb_ExternalProject_use_unpacked,cairo,libpng))
23 endif
25 $(eval $(call gb_ExternalProject_register_targets,cairo,\
26 build \
29 ifeq ($(OS),WNT)
31 $(call gb_ExternalProject_get_state_target,cairo,build) :
32 $(call gb_ExternalProject_run,build,\
33 $(MAKE) -f Makefile.win32 CFG=release ZLIB3RDLIB=zlib.lib \
37 else
39 # overwrite src/cairo-version.h because that is just a dummy file and included
40 # from cairo.h in non-overridable way
42 $(call gb_ExternalProject_get_state_target,cairo,build) :
43 $(call gb_ExternalProject_run,build,\
44 ./configure \
45 $(if $(debug),STRIP=" ") \
46 $(if $(filter ANDROID iOS,$(OS)),CFLAGS="$(if $(debug),-g) $(ZLIB_CFLAGS) $(gb_VISIBILITY_FLAGS)") \
47 $(if $(filter-out ANDROID iOS,$(OS)),CFLAGS="$(if $(debug),-g) $(ZLIB_CFLAGS)" ) \
48 $(if $(filter ANDROID iOS,$(OS)),PKG_CONFIG=./dummy_pkg_config) \
49 LIBS="$(ZLIB_LIBS)" \
50 $(if $(filter -fsanitize=%,$(LDFLAGS)),LDFLAGS="$(LDFLAGS) -fuse-ld=bfd") \
51 pixman_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,pixman)/pixman" \
52 pixman_LIBS="-L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
53 $(if $(filter LINUX,$(OS)),-Wl$(COMMA)-z$(COMMA)origin \
54 -Wl$(COMMA)-rpath$(COMMA)\\\$$\$$ORIGIN)" \
55 png_REQUIRES="trick_configure_into_using_png_CFLAGS_and_LIBS" \
56 png_CFLAGS="$(LIBPNG_CFLAGS)" png_LIBS="$(LIBPNG_LIBS)" \
57 $(if $(SYSTEM_FREETYPE),,FREETYPE_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,freetype)/include") \
58 $(if $(SYSTEM_FONTCONFIG),,FONTCONFIG_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,fontconfig)") \
59 $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
60 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,$(if $(filter ANDROID,$(OS)),--disable-shared,--disable-static)) \
61 $(if $(filter ANDROID iOS,$(OS)),--disable-xlib --disable-xcb,$(if $(filter TRUE,$(DISABLE_GUI)),--disable-xlib --disable-xcb,--enable-xlib --enable-xcb)) \
62 $(if $(filter iOS,$(OS)),--enable-quartz --enable-quartz-font) \
63 --disable-valgrind \
64 $(if $(filter iOS,$(OS)),--disable-ft,--enable-ft --enable-fc) \
65 --disable-svg --enable-gtk-doc=no --enable-test-surfaces=no \
66 $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
67 $(if $(filter INTEL ARM,$(CPUNAME)),ac_cv_c_bigendian=no ax_cv_c_float_words_bigendian=no)) \
68 $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
69 && cp cairo-version.h src/cairo-version.h \
70 && cd src && $(MAKE) \
73 endif
75 # vim: set noet sw=4 ts=4: