fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / external / libgltf / ExternalProject_libgltf.mk
blob877092ca0a4bc2475754ef2d0ec9e5310e558e54
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,libgltf))
12 $(eval $(call gb_ExternalProject_use_autoconf,libgltf,build))
14 $(eval $(call gb_ExternalProject_register_targets,libgltf,\
15 build \
18 $(eval $(call gb_ExternalProject_use_externals,libgltf,\
19 boost_headers \
20 glew \
21 glm_headers \
25 ifeq ($(COM),MSC)
27 libgltf_AdditionalIncludes :=
29 ifeq ($(SYSTEM_BOOST),)
30 libgltf_AdditionalIncludes += "$(call gb_UnpackedTarball_get_dir,boost)"
31 endif
33 ifeq ($(SYSTEM_GLEW),)
34 libgltf_AdditionalIncludes += "$(call gb_UnpackedTarball_get_dir,glew)/include"
35 endif
37 ifeq ($(SYSTEM_GLM),)
38 libgltf_AdditionalIncludes += "$(call gb_UnpackedTarball_get_dir,glm)"
39 endif
41 $(call gb_ExternalProject_get_state_target,libgltf,build) :
42 $(call gb_ExternalProject_run,build,\
43 msbuild.exe libgltf.vcxproj /p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \
44 /p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
45 $(if $(filter 120,$(VCVER)),/p:PlatformToolset=v120 /p:VisualStudioVersion=12.0 /ToolsVersion:12.0) \
46 $(if $(filter 110,$(VCVER)),/p:PlatformToolset=$(if $(filter 80,$(WINDOWS_SDK_VERSION)),v110,v110_xp) \
47 /p:VisualStudioVersion=11.0) \
48 '/p:AdditionalIncludeDirectories=$(subst $(WHITESPACE),;,$(subst /,\,$(strip $(libgltf_AdditionalIncludes))))' \
49 /p:AdditionalLibraryDirectories=$(if $(SYSTEM_GLEW),,"$(subst /,\,$(call gb_UnpackedTarball_get_dir,glew))\lib\$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)\Win32") \
50 ,build/win32)
52 else # !ifeq($(COM),MSC)
54 libgltf_CPPFLAGS=$(CPPFLAGS)
55 ifneq (,$(filter ANDROID DRAGONFLY FREEBSD IOS LINUX NETBSD OPENBSD,$(OS)))
56 ifneq (,$(gb_ENABLE_DBGUTIL))
57 libgltf_CPPFLAGS+=-D_GLIBCXX_DEBUG
58 endif
59 endif
61 $(call gb_ExternalProject_get_state_target,libgltf,build) :
62 $(call gb_ExternalProject_run,build,\
63 export PKG_CONFIG="" \
64 && ./configure \
65 --disable-shared \
66 --enable-static \
67 --with-pic \
68 $(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \
69 --disable-werror \
70 BOOST_CFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost))" \
71 GLEW_CFLAGS="$(if $(SYSTEM_GLEW),$(GLEW_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,glew)/include)" \
72 GLM_CFLAGS="$(if $(SYSTEM_GLM),$(GLM_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,glm))" \
73 $(if $(libgltf_CPPFLAGS),CPPFLAGS='$(libgltf_CPPFLAGS)') \
74 && $(MAKE) \
77 endif
79 # vim: set noet sw=4 ts=4: