diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-11-25 20:25:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-12-13 11:33:18 +0000 |
commit | 482d7ce61b423600b41b459eb26a2cc221cd0acf (patch) | |
tree | 8da6edb8200889d93f0b344e61ed779c037a590f /external | |
parent | 178e38dd82a2cffb2db747c7be82ba7a48338968 (diff) |
change from glew to epoxy
because that works under wayland out of the box and gtk3 uses it already
Change-Id: Iefaac31e325534a81a5389f752804af917c1baef
Reviewed-on: https://gerrit.libreoffice.org/31213
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/Module_external.mk | 2 | ||||
-rw-r--r-- | external/epoxy/Library_epoxy.mk | 63 | ||||
-rw-r--r-- | external/epoxy/Makefile (renamed from external/glew/Makefile) | 0 | ||||
-rw-r--r-- | external/epoxy/Module_epoxy.mk (renamed from external/glew/Module_glew.mk) | 9 | ||||
-rw-r--r-- | external/epoxy/README | 5 | ||||
-rw-r--r-- | external/epoxy/UnpackedTarball_epoxy.mk | 20 | ||||
-rw-r--r-- | external/epoxy/epoxy.windows.api.patch | 90 | ||||
-rw-r--r-- | external/glew/ExternalPackage_glew.mk | 33 | ||||
-rw-r--r-- | external/glew/ExternalProject_glew.mk | 36 | ||||
-rw-r--r-- | external/glew/README | 6 | ||||
-rw-r--r-- | external/glew/UnpackedTarball_glew.mk | 48 | ||||
-rw-r--r-- | external/glew/glew-macosx-install-name.patch.1 | 13 | ||||
-rw-r--r-- | external/glew/glew-msvc-disable-sse2.patch.1 | 10 | ||||
-rw-r--r-- | external/glew/glew-static-only.patch.1 | 12 | ||||
-rw-r--r-- | external/glew/glew-tmpdir.patch.1 | 13 | ||||
-rw-r--r-- | external/glew/glew_use_CC_variable.patch.1 | 24 | ||||
-rw-r--r-- | external/libgltf/ExternalProject_libgltf.mk | 10 | ||||
-rw-r--r-- | external/libgltf/libgltf-msvc-x64.patch.1 | 31 |
18 files changed, 202 insertions, 223 deletions
diff --git a/external/Module_external.mk b/external/Module_external.mk index 1dbf97b13265..c14e6680bbc3 100644 --- a/external/Module_external.mk +++ b/external/Module_external.mk @@ -38,13 +38,13 @@ $(eval $(call gb_Module_add_moduledirs,external,\ $(call gb_Helper_optional,CURL,curl) \ $(call gb_Helper_optional,EBOOK,libebook) \ $(call gb_Helper_optional,EPM,epm) \ + $(call gb_Helper_optional,EPOXY,epoxy) \ $(call gb_Helper_optional,ETONYEK,libetonyek) \ $(call gb_Helper_optional,EXPAT,expat) \ $(call gb_Helper_optional,FIREBIRD,firebird) \ $(call gb_Helper_optional,FONTCONFIG,fontconfig) \ $(call gb_Helper_optional,FREEHAND,libfreehand) \ $(call gb_Helper_optional,FREETYPE,freetype) \ - $(call gb_Helper_optional,GLEW,glew) \ $(call gb_Helper_optional,GLM,glm) \ $(call gb_Helper_optional,GRAPHITE,graphite) \ $(call gb_Helper_optional,HARFBUZZ,harfbuzz) \ diff --git a/external/epoxy/Library_epoxy.mk b/external/epoxy/Library_epoxy.mk new file mode 100644 index 000000000000..28f9dab6b709 --- /dev/null +++ b/external/epoxy/Library_epoxy.mk @@ -0,0 +1,63 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Library_Library,epoxy)) + +$(eval $(call gb_Library_use_unpacked,epoxy,epoxy)) + +$(eval $(call gb_Library_set_warnings_not_errors,epoxy)) + +$(eval $(call gb_Library_set_include,epoxy,\ + -I$(WORKDIR)/UnpackedTarball/epoxy/include \ + -I$(WORKDIR)/UnpackedTarball/epoxy/src \ + $$(INCLUDE) \ +)) + +# epoxy is riddled with warnings... let's spare use +# the pointless spamming +$(eval $(call gb_Library_add_cxxflags,epoxy,\ + -w \ +)) +$(eval $(call gb_Library_add_cflags,epoxy,\ + -w \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_libs,epoxy,\ + -ldl \ +)) +endif + +$(eval $(call gb_Library_add_generated_cobjects,epoxy,\ + UnpackedTarball/epoxy/src/dispatch_common \ + UnpackedTarball/epoxy/src/gl_generated_dispatch \ +)) + +ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_generated_cobjects,epoxy,\ + UnpackedTarball/epoxy/src/dispatch_wgl \ + UnpackedTarball/epoxy/src/wgl_generated_dispatch \ +)) +else ifeq ($(OS),MACOSX) +# nothing +else ifeq ($(OS),ANDROID) +$(eval $(call gb_Library_add_generated_cobjects,epoxy,\ + UnpackedTarball/epoxy/src/dispatch_egl \ + UnpackedTarball/epoxy/src/egl_generated_dispatch \ +)) +else +$(eval $(call gb_Library_add_generated_cobjects,epoxy,\ + UnpackedTarball/epoxy/src/dispatch_glx \ + UnpackedTarball/epoxy/src/glx_generated_dispatch \ + UnpackedTarball/epoxy/src/dispatch_egl \ + UnpackedTarball/epoxy/src/egl_generated_dispatch \ +)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/glew/Makefile b/external/epoxy/Makefile index e4968cf85fb6..e4968cf85fb6 100644 --- a/external/glew/Makefile +++ b/external/epoxy/Makefile diff --git a/external/glew/Module_glew.mk b/external/epoxy/Module_epoxy.mk index 1d1b9a7154aa..ea65176b85b3 100644 --- a/external/glew/Module_glew.mk +++ b/external/epoxy/Module_epoxy.mk @@ -7,12 +7,11 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_Module_Module,glew)) +$(eval $(call gb_Module_Module,epoxy)) -$(eval $(call gb_Module_add_targets,glew,\ - ExternalProject_glew \ - UnpackedTarball_glew \ - ExternalPackage_glew \ +$(eval $(call gb_Module_add_targets,epoxy,\ + Library_epoxy \ + UnpackedTarball_epoxy \ )) # vim: set noet sw=4 ts=4: diff --git a/external/epoxy/README b/external/epoxy/README new file mode 100644 index 000000000000..8bd467af5c76 --- /dev/null +++ b/external/epoxy/README @@ -0,0 +1,5 @@ +Epoxy is an OpenGL Extension Wrangler + +Epoxy is a library for handling OpenGL function pointer management for you + +https://github.com/anholt/libepoxy diff --git a/external/epoxy/UnpackedTarball_epoxy.mk b/external/epoxy/UnpackedTarball_epoxy.mk new file mode 100644 index 000000000000..76c0fdf9cee9 --- /dev/null +++ b/external/epoxy/UnpackedTarball_epoxy.mk @@ -0,0 +1,20 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,epoxy)) + +$(eval $(call gb_UnpackedTarball_set_tarball,epoxy,$(EPOXY_TARBALL))) + +$(eval $(call gb_UnpackedTarball_set_patchlevel,epoxy,0)) + +$(eval $(call gb_UnpackedTarball_add_patches,epoxy, \ + external/epoxy/epoxy.windows.api.patch \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/epoxy/epoxy.windows.api.patch b/external/epoxy/epoxy.windows.api.patch new file mode 100644 index 000000000000..12d2afb6a6ad --- /dev/null +++ b/external/epoxy/epoxy.windows.api.patch @@ -0,0 +1,90 @@ +--- include/epoxy/gl.h ++++ include/epoxy/gl.h +@@ -59,7 +59,8 @@ + + #else + #ifndef APIENTRY +-#define APIENTRY __stdcall ++#define WINAPI __stdcall ++#define APIENTRY WINAPI + #endif + + #ifndef GLAPIENTRY +--- src/egl_generated_dispatch.c ++++ src/egl_generated_dispatch.c +@@ -128,7 +128,11 @@ + }; + + #if USING_DISPATCH_TABLE ++#if defined (_MSC_VER) ++static __inline struct dispatch_table * ++#else + static inline struct dispatch_table * ++#endif + get_dispatch_table(void); + + #endif +@@ -1642,7 +1646,11 @@ + uint32_t egl_tls_index; + uint32_t egl_tls_size = sizeof(struct dispatch_table); + ++#if defined (_MSC_VER) ++static __inline struct dispatch_table * ++#else + static inline struct dispatch_table * ++#endif + get_dispatch_table(void) + { + return TlsGetValue(egl_tls_index); +--- src/gl_generated_dispatch.c ++++ src/gl_generated_dispatch.c +@@ -3122,7 +3122,11 @@ + }; + + #if USING_DISPATCH_TABLE ++#if defined (_MSC_VER) ++static __inline struct dispatch_table * ++#else + static inline struct dispatch_table * ++#endif + get_dispatch_table(void); + + #endif +@@ -51507,7 +51511,11 @@ + uint32_t gl_tls_index; + uint32_t gl_tls_size = sizeof(struct dispatch_table); + ++#if defined (_MSC_VER) ++static __inline struct dispatch_table * ++#else + static inline struct dispatch_table * ++#endif + get_dispatch_table(void) + { + return TlsGetValue(gl_tls_index); +--- src/wgl_generated_dispatch.c ++++ src/wgl_generated_dispatch.c +@@ -157,7 +157,11 @@ + }; + + #if USING_DISPATCH_TABLE ++#if defined (_MSC_VER) ++static __inline struct dispatch_table * ++#else + static inline struct dispatch_table * ++#endif + get_dispatch_table(void); + + #endif +@@ -1701,7 +1705,11 @@ + uint32_t wgl_tls_index; + uint32_t wgl_tls_size = sizeof(struct dispatch_table); + ++#if defined (_MSC_VER) ++static __inline struct dispatch_table * ++#else + static inline struct dispatch_table * ++#endif + get_dispatch_table(void) + { + return TlsGetValue(wgl_tls_index); diff --git a/external/glew/ExternalPackage_glew.mk b/external/glew/ExternalPackage_glew.mk deleted file mode 100644 index e6adc8b6ce26..000000000000 --- a/external/glew/ExternalPackage_glew.mk +++ /dev/null @@ -1,33 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# - -$(eval $(call gb_ExternalPackage_ExternalPackage,glew,glew)) - -$(eval $(call gb_ExternalPackage_use_external_project,glew,glew)) - -ifeq ($(OS)-$(COM),WNT-MSC) -ifeq ($(CPUNAME),INTEL) -glew_arch_subdir=Win32 -else ifeq ($(CPUNAME),X86_64) -glew_arch_subdir=x64 -endif -endif - -ifeq ($(OS),MACOSX) -$(eval $(call gb_ExternalPackage_add_file,glew,$(LIBO_LIB_FOLDER)/libGLEW.1.12.0.dylib,lib/libGLEW.1.12.0.dylib)) -else ifeq ($(OS)-$(COM),WNT-GCC) -else ifeq ($(COM),MSC) -$(eval $(call gb_ExternalPackage_add_files,glew,$(LIBO_LIB_FOLDER), \ - bin/$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/$(glew_arch_subdir)/glew32d.dll,Release/$(glew_arch_subdir)/glew32.dll) \ -)) -else ifeq ($(DISABLE_DYNLOADING),) -$(eval $(call gb_ExternalPackage_add_file,glew,$(LIBO_LIB_FOLDER)/libGLEW.so.1.12,lib/libGLEW.so.1.12.0)) -endif - -# vim: set noet sw=4 ts=4: diff --git a/external/glew/ExternalProject_glew.mk b/external/glew/ExternalProject_glew.mk deleted file mode 100644 index 0d80cd03bd33..000000000000 --- a/external/glew/ExternalProject_glew.mk +++ /dev/null @@ -1,36 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# - -$(eval $(call gb_ExternalProject_ExternalProject,glew)) - -$(eval $(call gb_ExternalProject_register_targets,glew,\ - build \ -)) - -ifeq ($(COM),MSC) -$(call gb_ExternalProject_get_state_target,glew,build) : - $(call gb_ExternalProject_run,build,\ - $(if $(filter 140,$(VCVER)),$(DEVENV) /Upgrade glew.sln,echo up-to-date) && \ - msbuild.exe glew_shared.vcxproj /p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) /p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) $(if $(filter 140,$(VCVER)),/p:PlatformToolset=v140,/p:PlatformToolset=v120) \ - ,build/vc12) \ - $(call gb_ExternalProject_run,build,\ - msbuild.exe glewinfo.vcxproj /p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) /p:Configuration=Release $(if $(filter 140,$(VCVER)),/p:PlatformToolset=v140,/p:PlatformToolset=v120) \ - ,build/vc12) - -else - -$(call gb_ExternalProject_get_state_target,glew,build) : - $(call gb_ExternalProject_run,glew,\ - $(if $(ENABLE_DEBUG),STRIP=) LD="$(CC)" \ - $(MAKE) STRIP= glew.lib $(if $(filter DESKTOP,$(BUILD_TYPE)),$(if $(ENABLE_DEBUG),debug)) \ - ) - -endif - -# vim: set noet sw=4 ts=4: diff --git a/external/glew/README b/external/glew/README deleted file mode 100644 index 34b2d249401c..000000000000 --- a/external/glew/README +++ /dev/null @@ -1,6 +0,0 @@ -GLEW is the OpenGL Extension Wrangler - -GLEW provides efficient run-time mechanisms for determining which OpenGL -extensions are supported on the target platform. - -http://glew.sourceforge.net/ diff --git a/external/glew/UnpackedTarball_glew.mk b/external/glew/UnpackedTarball_glew.mk deleted file mode 100644 index c47b7a07e2ad..000000000000 --- a/external/glew/UnpackedTarball_glew.mk +++ /dev/null @@ -1,48 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# - -$(eval $(call gb_UnpackedTarball_UnpackedTarball,glew)) - -$(eval $(call gb_UnpackedTarball_set_tarball,glew,$(GLEW_TARBALL))) - -$(eval $(call gb_UnpackedTarball_set_patchlevel,glew,0)) - -$(eval $(call gb_UnpackedTarball_fix_end_of_line,glew,\ - Makefile \ - include/GL/glew.h \ -)) - -ifeq ($(OS)$(COM),WNTMSC) -$(eval $(call gb_UnpackedTarball_set_patchflags,glew,--binary)) -$(eval $(call gb_UnpackedTarball_add_patches,glew,\ - external/glew/glew-msvc-disable-sse2.patch.1 \ -)) -else -$(eval $(call gb_UnpackedTarball_add_patches,glew,\ - external/glew/glew_use_CC_variable.patch.1 \ -)) -endif - -ifeq ($(OS),MACOSX) -$(eval $(call gb_UnpackedTarball_add_patches,glew,\ - external/glew/glew-macosx-install-name.patch.1 \ -)) -endif - -ifeq ($(DISABLE_DYNLOADING),TRUE) -$(eval $(call gb_UnpackedTarball_add_patches,glew,\ - external/glew/glew-static-only.patch.1 \ -)) -endif - -$(eval $(call gb_UnpackedTarball_add_patches,glew,\ - external/glew/glew-tmpdir.patch.1 \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/external/glew/glew-macosx-install-name.patch.1 b/external/glew/glew-macosx-install-name.patch.1 deleted file mode 100644 index 75e8e7f1a178..000000000000 --- a/external/glew/glew-macosx-install-name.patch.1 +++ /dev/null @@ -1,13 +0,0 @@ --*- Mode:Diff -*- -diff -ur glew.org/build/glew.rc glew/build/glew.rc ---- glew/config/Makefile.darwin -+++ glew/config/Makefile.darwin -@@ -20,7 +20,7 @@ - LIB.DEVLNK = lib$(NAME).dylib - LIB.SHARED = lib$(NAME).$(SO_VERSION).dylib - LIB.STATIC = lib$(NAME).a --LDFLAGS.SO = -dynamiclib -install_name $(GLEW_DEST)/lib/$(LIB.SHARED) -current_version $(SO_VERSION) -compatibility_version $(SO_MAJOR) -+LDFLAGS.SO = -dynamiclib -install_name @__________________________________________________OOO/$(LIB.SHARED) -current_version $(SO_VERSION) -compatibility_version $(SO_MAJOR) - LIB.SONAME.MX = lib$(NAME)mx.$(SO_MAJOR).dylib - LIB.DEVLNK.MX = lib$(NAME)mx.dylib - LIB.SHARED.MX = lib$(NAME)mx.$(SO_VERSION).dylib diff --git a/external/glew/glew-msvc-disable-sse2.patch.1 b/external/glew/glew-msvc-disable-sse2.patch.1 deleted file mode 100644 index 6b07044f5507..000000000000 --- a/external/glew/glew-msvc-disable-sse2.patch.1 +++ /dev/null @@ -1,10 +0,0 @@ ---- glew/build//vc10/common.props.orig 2014-10-02 15:06:57.027060664 +0200 -+++ glew/build//vc10/common.props 2014-10-02 15:06:59.026060509 +0200 -@@ -10,6 +10,7 @@ - <ItemDefinitionGroup> - <ClCompile> - <AdditionalIncludeDirectories>$(INCLUDE_DIR)</AdditionalIncludeDirectories> -+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet> - </ClCompile> - </ItemDefinitionGroup> - <ItemGroup> diff --git a/external/glew/glew-static-only.patch.1 b/external/glew/glew-static-only.patch.1 deleted file mode 100644 index 14ccff23a6be..000000000000 --- a/external/glew/glew-static-only.patch.1 +++ /dev/null @@ -1,12 +0,0 @@ --*- Mode:Diff -*- ---- glew/Makefile -+++ glew/Makefile -@@ -93,7 +93,7 @@ - LIB.SOBJS.MX := $(addprefix tmp/$(SYSTEM)/mx/shared/,$(LIB.SRCS.NAMES)) - LIB.SOBJS.MX := $(LIB.SOBJS.MX:.c=.o) - --glew.lib: lib lib/$(LIB.SHARED) lib/$(LIB.STATIC) glew.pc -+glew.lib: lib lib/$(LIB.STATIC) - - lib: - mkdir lib diff --git a/external/glew/glew-tmpdir.patch.1 b/external/glew/glew-tmpdir.patch.1 deleted file mode 100644 index 9a2847ba279a..000000000000 --- a/external/glew/glew-tmpdir.patch.1 +++ /dev/null @@ -1,13 +0,0 @@ -diff -ur glew.org/Makefile glew/Makefile ---- glew.org/Makefile 2016-05-02 06:25:53.521291677 +0200 -+++ glew/Makefile 2016-05-02 06:31:10.325035494 +0200 -@@ -55,7 +55,8 @@ - DIST_SRC_TGZ ?= $(shell pwd)/$(DIST_NAME).tgz - DIST_WIN32 ?= $(shell pwd)/$(DIST_NAME)-win32.zip - --DIST_DIR := $(shell mktemp -d /tmp/glew.XXXXXX)/$(DIST_NAME) -+TMPDIR ?= /tmp -+DIST_DIR := $(shell mktemp -d $(TMPDIR)/glew.XXXXXX)/$(DIST_NAME) - - # To disable stripping of binaries either: - # - use STRIP= on gmake command-line diff --git a/external/glew/glew_use_CC_variable.patch.1 b/external/glew/glew_use_CC_variable.patch.1 deleted file mode 100644 index 56e9903d937b..000000000000 --- a/external/glew/glew_use_CC_variable.patch.1 +++ /dev/null @@ -1,24 +0,0 @@ -Use CC variable from environment, don't hardcode "cc". - ---- glew/config/Makefile.linux.orig 2014-01-29 15:39:43.364972925 +0100 -+++ glew/config/Makefile.linux 2014-01-29 15:44:45.621000941 +0100 -@@ -1,6 +1,6 @@ - NAME = $(GLEW_NAME) --CC = cc --LD = cc -+CC ?= cc -+LD ?= $(CC) - M_ARCH ?= $(shell uname -m) - ARCH64 = false - ifeq (x86_64,${M_ARCH}) ---- glew/config/Makefile.darwin.orig 2014-01-29 15:44:39.541000377 +0100 -+++ glew/config/Makefile.darwin 2014-01-29 15:44:47.548001120 +0100 -@@ -1,6 +1,6 @@ - NAME = $(GLEW_NAME) --CC = cc --LD = cc -+CC ?= cc -+LD ?= $(CC) - CFLAGS.EXTRA = -dynamic -fno-common - #CFLAGS.EXTRA += -no-cpp-precomp - LDFLAGS.EXTRA = diff --git a/external/libgltf/ExternalProject_libgltf.mk b/external/libgltf/ExternalProject_libgltf.mk index 57c01d048208..90a1d967ac27 100644 --- a/external/libgltf/ExternalProject_libgltf.mk +++ b/external/libgltf/ExternalProject_libgltf.mk @@ -17,7 +17,7 @@ $(eval $(call gb_ExternalProject_register_targets,libgltf,\ $(eval $(call gb_ExternalProject_use_externals,libgltf,\ boost_headers \ - glew \ + epoxy \ glm_headers \ )) @@ -30,8 +30,8 @@ ifeq ($(SYSTEM_BOOST),) libgltf_AdditionalIncludes += "$(call gb_UnpackedTarball_get_dir,boost)" endif -ifeq ($(SYSTEM_GLEW),) -libgltf_AdditionalIncludes += "$(call gb_UnpackedTarball_get_dir,glew)/include" +ifeq ($(SYSTEM_EPOXY),) +libgltf_AdditionalIncludes += "$(call gb_UnpackedTarball_get_dir,epoxy)/include" endif ifeq ($(SYSTEM_GLM),) @@ -45,7 +45,7 @@ $(call gb_ExternalProject_get_state_target,libgltf,build) : $(if $(filter 120,$(VCVER)),/p:PlatformToolset=v120 /p:VisualStudioVersion=12.0 /ToolsVersion:12.0) \ $(if $(filter 140,$(VCVER)),/p:PlatformToolset=v140 /p:VisualStudioVersion=14.0 /ToolsVersion:14.0) \ '/p:AdditionalIncludeDirectories=$(subst $(WHITESPACE),;,$(subst /,\,$(strip $(libgltf_AdditionalIncludes))))' \ - /p:AdditionalLibraryDirectories=$(if $(SYSTEM_GLEW),,"$(subst /,\,$(call gb_UnpackedTarball_get_dir,glew))\lib\$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)\Win32") \ + /p:AdditionalLibraryDirectories=$(if $(SYSTEM_EPOXY),,"$(subst /,\,$(call gb_UnpackedTarball_get_dir,epoxy))\lib\$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)\Win32") \ ,build/win32) else # !ifeq($(COM),MSC) @@ -67,7 +67,7 @@ $(call gb_ExternalProject_get_state_target,libgltf,build) : $(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \ --disable-werror \ BOOST_CFLAGS="$(BOOST_CPPFLAGS)" \ - GLEW_CFLAGS="$(if $(SYSTEM_GLEW),$(GLEW_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,glew)/include) -DGLEW_NO_GLU" \ + EPOXY_CFLAGS="$(if $(SYSTEM_EPOXY),$(EPOXY_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,epoxy)/include)" \ GLM_CFLAGS="$(if $(SYSTEM_GLM),$(GLM_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,glm))" \ $(if $(libgltf_CPPFLAGS),CPPFLAGS='$(libgltf_CPPFLAGS)') \ && $(MAKE) \ diff --git a/external/libgltf/libgltf-msvc-x64.patch.1 b/external/libgltf/libgltf-msvc-x64.patch.1 index 86417a752605..32a831bebd5c 100644 --- a/external/libgltf/libgltf-msvc-x64.patch.1 +++ b/external/libgltf/libgltf-msvc-x64.patch.1 @@ -20,7 +20,7 @@ diff -ur libgltf.org/build/win32/libgltf.vcxproj libgltf/build/win32/libgltf.vcx </ItemGroup> <ItemGroup> <ClInclude Include="..\..\inc\libgltf.h" /> -@@ -56,6 +64,12 @@ +@@ -53,6 +61,12 @@ <CharacterSet>MultiByte</CharacterSet> <PlatformToolset>v110</PlatformToolset> </PropertyGroup> @@ -33,7 +33,7 @@ diff -ur libgltf.org/build/win32/libgltf.vcxproj libgltf/build/win32/libgltf.vcx <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> -@@ -63,15 +77,28 @@ +@@ -60,15 +74,28 @@ <CharacterSet>MultiByte</CharacterSet> <PlatformToolset>v110</PlatformToolset> </PropertyGroup> @@ -62,8 +62,8 @@ diff -ur libgltf.org/build/win32/libgltf.vcxproj libgltf/build/win32/libgltf.vcx <PropertyGroup Label="UserMacros" /> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> -@@ -86,6 +113,19 @@ - <AdditionalDependencies>opengl32.lib;glew32.lib;$(AdditionalDependencies)</AdditionalDependencies> +@@ -83,10 +110,42 @@ + <AdditionalDependencies>opengl32.lib;epoxy32.lib;$(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> @@ -76,20 +76,13 @@ diff -ur libgltf.org/build/win32/libgltf.vcxproj libgltf/build/win32/libgltf.vcx + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <AdditionalLibraryDirectories>$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> -+ <AdditionalDependencies>opengl32.lib;glew32.lib;$(AdditionalDependencies)</AdditionalDependencies> ++ <AdditionalDependencies>opengl32.lib;epoxy32.lib;$(AdditionalDependencies)</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <WarningLevel>Level4</WarningLevel> -@@ -105,6 +145,25 @@ - <SubSystem>Windows</SubSystem> - </Link> - </ItemDefinitionGroup> -+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> -+ <ClCompile> -+ <WarningLevel>Level4</WarningLevel> -+ <Optimization>MaxSpeed</Optimization> + <Optimization>MaxSpeed</Optimization> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> @@ -101,10 +94,14 @@ diff -ur libgltf.org/build/win32/libgltf.vcxproj libgltf/build/win32/libgltf.vcx + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <AdditionalLibraryDirectories>$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> -+ <AdditionalDependencies>opengl32.lib;glew32.lib;$(AdditionalDependencies)</AdditionalDependencies> ++ <AdditionalDependencies>opengl32.lib;epoxy32.lib;$(AdditionalDependencies)</AdditionalDependencies> + <SubSystem>Windows</SubSystem> + </Link> + </ItemDefinitionGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> ++ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> ++ <ClCompile> ++ <WarningLevel>Level4</WarningLevel> ++ <Optimization>MaxSpeed</Optimization> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> |