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
,\
18 $(eval
$(call gb_ExternalProject_use_externals
,libgltf
,\
27 libgltf_AdditionalIncludes
:=
29 ifeq ($(SYSTEM_BOOST
),)
30 libgltf_AdditionalIncludes
+= "$(call gb_UnpackedTarball_get_dir,boost)"
33 ifeq ($(SYSTEM_GLEW
),)
34 libgltf_AdditionalIncludes
+= "$(call gb_UnpackedTarball_get_dir,glew)/include"
38 libgltf_AdditionalIncludes
+= "$(call gb_UnpackedTarball_get_dir,glm)"
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") \
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
61 $(call gb_ExternalProject_get_state_target
,libgltf
,build
) :
62 $(call gb_ExternalProject_run
,build
,\
63 export PKG_CONFIG
="" \
68 $(if
$(ENABLE_DEBUG
),--enable-debug
,--disable-debug
) \
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)') \
79 # vim: set noet sw=4 ts=4: