Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / external / libgltf / ExternalProject_libgltf.mk
blob746c5742d5148063bd529666ae09ff539e570c1a
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 epoxy \
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_EPOXY),)
34 libgltf_AdditionalIncludes += "$(call gb_UnpackedTarball_get_dir,epoxy)/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 140,$(VCVER)),/p:PlatformToolset=v140 /p:VisualStudioVersion=14.0 /ToolsVersion:14.0) \
47 $(if $(filter 150,$(VCVER)),/p:PlatformToolset=v141 /p:VisualStudioVersion=15.0 /ToolsVersion:15.0) \
48 $(if $(filter 150-10,$(VCVER)-$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION)) \
49 '/p:AdditionalIncludeDirectories=$(subst $(WHITESPACE),;,$(subst /,\,$(strip $(libgltf_AdditionalIncludes))))' \
50 /p:AdditionalLibraryDirectories=$(if $(SYSTEM_EPOXY),,"$(subst /,\,$(call gb_UnpackedTarball_get_dir,epoxy))\lib\$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)\Win32") \
51 ,build/win32)
53 else # !ifeq($(COM),MSC)
55 libgltf_CPPFLAGS=$(CPPFLAGS)
56 ifneq (,$(filter ANDROID DRAGONFLY FREEBSD IOS LINUX NETBSD OPENBSD,$(OS)))
57 ifneq (,$(gb_ENABLE_DBGUTIL))
58 libgltf_CPPFLAGS+=-D_GLIBCXX_DEBUG
59 endif
60 endif
62 $(call gb_ExternalProject_get_state_target,libgltf,build) :
63 $(call gb_ExternalProject_run,build,\
64 export PKG_CONFIG="" \
65 && ./configure \
66 --disable-shared \
67 --enable-static \
68 --with-pic \
69 $(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \
70 --disable-werror \
71 BOOST_CFLAGS="$(BOOST_CPPFLAGS)" \
72 EPOXY_CFLAGS="$(if $(SYSTEM_EPOXY),$(EPOXY_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,epoxy)/include)" \
73 GLM_CFLAGS="$(if $(SYSTEM_GLM),$(GLM_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,glm))" \
74 $(if $(libgltf_CPPFLAGS),CPPFLAGS='$(libgltf_CPPFLAGS)') \
75 && $(MAKE) \
78 endif
80 # vim: set noet sw=4 ts=4: