Bump version to 4.3-4
[LibreOffice.git] / external / libgltf / ExternalProject_libgltf.mk
blob62e25a303f13dbca75af2d488d8236f503cf7864
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 libgltf_AdditionalIncludes += "$(BUILDDIR)/config_$(gb_Side)"
32 endif
34 ifeq ($(SYSTEM_GLEW),)
35 libgltf_AdditionalIncludes += "$(call gb_UnpackedTarball_get_dir,glew)/include"
36 endif
38 ifeq ($(SYSTEM_GLM),)
39 libgltf_AdditionalIncludes += "$(call gb_UnpackedTarball_get_dir,glm)"
40 endif
42 $(call gb_ExternalProject_get_state_target,libgltf,build) :
43 $(call gb_ExternalProject_run,build,\
44 msbuild.exe libgltf.vcxproj \
45 /p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
46 $(if $(filter 110,$(VCVER)),/p:PlatformToolset=$(if $(filter 80,$(WINDOWS_SDK_VERSION)),v110,v110_xp) \
47 /p:VisualStudioVersion=11.0) \
48 $(if $(filter 100,$(VCVER)),/p:PlatformToolset=v100 \
49 /p:VisualStudioVersion=10.0) \
50 '/p:AdditionalIncludeDirectories=$(subst $(WHITESPACE),;,$(subst /,\,$(strip $(libgltf_AdditionalIncludes))))' \
51 /p:AdditionalLibraryDirectories=$(if $(SYSTEM_GLEW),,"$(subst /,\,$(call gb_UnpackedTarball_get_dir,glew))\lib\$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)\Win32") \
52 ,build/win32)
54 else
56 libgltf_CPPFLAGS :=
57 ifneq (,$(gb_ENABLE_DBGUTIL))
58 libgltf_CPPFLAGS += -D_GLIBCXX_DEBUG
59 endif
61 $(call gb_ExternalProject_get_state_target,libgltf,build) :
62 $(call gb_ExternalProject_run,build,\
63 export CPPFLAGS='$(libgltf_CPPFLAGS)' \
64 && export PKG_CONFIG="" \
65 && ./configure \
66 --disable-shared \
67 --enable-static \
68 --with-pic \
69 --disable-debug \
70 --disable-werror \
71 BOOST_CFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost)) -I$(BUILDDIR)/config_$(gb_Side)" \
72 GLEW_CFLAGS="$(if $(SYSTEM_GLEW),$(GLEW_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,glew)/include)" \
73 GLM_CFLAGS="$(if $(SYSTEM_GLM),$(GLM_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,glm))" \
74 && $(MAKE) \
77 endif
79 # vim: set noet sw=4 ts=4: