Kaydet (Commit) aa5fe795 authored tarafından Zolnai Tamás's avatar Zolnai Tamás Kaydeden (comit) Matúš Kukan

Introduce OpenCollada external library

Change-Id: I08a806b9319f7cb55be3b38a3bb9370799f6752b
üst 701f3dcb
......@@ -180,6 +180,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)
$(call fetch_Optional,NSS,NSS_TARBALL) \
$(call fetch_Optional_pack,NUMBERTEXT_EXTENSION_PACK) \
$(call fetch_Optional,ODFGEN,ODFGEN_TARBALL) \
$(call fetch_Optional,COLLADA2GLTF,OPENCOLLADA_TARBALL) \
$(call fetch_Optional,OPENLDAP,OPENLDAP_TARBALL) \
$(call fetch_Optional,OPENSSL,OPENSSL_TARBALL) \
$(call fetch_Optional,ORCUS,ORCUS_TARBALL) \
......
......@@ -3120,6 +3120,20 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\
)
endef
define gb_LinkTarget__use_opencollada_parser
$(call gb_LinkTarget_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \
-I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADAFramework/include \
-I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include \
-I$(call gb_UnpackedTarball_get_dir,opencollada)/GeneratedSaxParser/include \
$$(INCLUDE) \
)
$(call gb_LinkTarget_use_static_libraries,$(1),\
opencollada_parser \
)
endef
endif
### Jars ############################################################
......
......@@ -6281,6 +6281,27 @@ fi
AC_SUBST(CXXFLAGS_CXX11)
AC_SUBST(HAVE_CXX11)
AC_MSG_CHECKING([for std::shared_ptr])
if test "$HAVE_CXX11" = "TRUE" -a "$GCC" = "yes"; then
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#include <memory>
using std::shared_ptr;
])],
[ have_std_shared_ptr=yes ],
[ have_std_shared_ptr=no ]
)
AC_LANG_POP([C++])
CXXFLAGS=$save_CXXFLAGS
elif test "$COM" = "MSC"; then
have_std_shared_ptr=yes
else
have_std_shared_ptr=no
fi
AC_MSG_RESULT([$have_std_shared_ptr])
dnl ==================================
dnl Check for C++11 "= delete" support
dnl ==================================
......@@ -10454,6 +10475,10 @@ if test "x$enable_gltf" != "xno"; then
FREETYPE_LIBS="${WORKDIR}/UnpackedTarball/freetype/objs/win32/vc2010/freetype248$FREETYPE_LIB_DEBUGLIB_SUFFIX.lib"
fi
fi
# otherwise build fails in collada2gltf external because of std::shared_ptr
if test "$have_std_shared_ptr" = "yes"; then
BUILD_TYPE="$BUILD_TYPE COLLADA2GLTF"
fi
else
AC_MSG_RESULT([no])
fi
......
......@@ -98,6 +98,8 @@ export NEON_TARBALL := ff369e69ef0f0143beb5626164e87ae2-neon-0.29.5.tar.gz
export NSS_TARBALL := 06beb053e257d9e22641339c905c6eba-nss-3.15.3-with-nspr-4.10.2.tar.gz
export ODFGEN_MD5SUM := e5483d1f0b71e64c367c1194b54b0f53
export ODFGEN_TARBALL := libodfgen-0.0.4.tar.bz2
export OPENCOLLADA_MD5SUM := 4ca8a6ef0afeefc864e9ef21b9f14bd6
export OPENCOLLADA_TARBALL := OpenCOLLADA-master-6509aa13af.tar.bz2
export OPENLDAP_TARBALL := 804c6cb5698db30b75ad0ff1c25baefd-openldap-2.4.31.tgz
export OPENSSL_TARBALL := de62b43dfcd858e66a74bee1c834e959-openssl-1.0.1g.tar.gz
export ORCUS_TARBALL := 7681383be6ce489d84c1c74f4e7f9643-liborcus-0.7.0.tar.bz2
......
......@@ -75,6 +75,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,NEON,neon) \
$(call gb_Helper_optional,NSS,nss) \
$(call gb_Helper_optional,ODFGEN,libodfgen) \
$(call gb_Helper_optional,COLLADA2GLTF,opencollada) \
$(call gb_Helper_optional,OPENLDAP,openldap) \
$(call gb_Helper_optional,OPENSSL,openssl) \
$(call gb_Helper_optional,ORCUS,liborcus) \
......
# -*- 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/.
#
module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
include $(module_directory)/../../solenv/gbuild/partial_build.mk
# vim: set noet sw=4 ts=4:
# -*- 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_Module_Module,opencollada))
$(eval $(call gb_Module_add_targets,opencollada,\
StaticLibrary_opencollada_parser \
UnpackedTarball_opencollada \
))
# vim: set noet sw=4 ts=4:
OpenCOLLADA is a COLLADA SDK that includes plug-ins for Autodesk Maya and 3ds Max.
LibreOffice mainly use it for parse collada files (*.dae).
From:
[https://github.com/khronosGroup/OpenCOLLADA/].
# -*- 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,opencollada))
$(eval $(call gb_UnpackedTarball_set_tarball,opencollada,$(OPENCOLLADA_TARBALL)))
$(eval $(call gb_UnpackedTarball_add_patches,opencollada,\
external/opencollada/opencollada.clang.patch.0 \
external/opencollada/opencollada.libxml.patch.0 \
))
# vim: set noet sw=4 ts=4:
diff -ur opencollada.org/COLLADABaseUtils/include/COLLADABUhash_map.h opencollada/COLLADABaseUtils/include/COLLADABUhash_map.h
--- COLLADABaseUtils/include/COLLADABUhash_map.h 2014-05-09 11:12:05.740858077 +0200
+++ COLLADABaseUtils/include/COLLADABUhash_map.h 2014-05-09 11:17:38.616861995 +0200
@@ -70,7 +70,7 @@
#define COLLADABU_HASH_NAMESPACE_CLOSE
#define COLLADABU_HASH_FUN hash
#else // Linux or Mac or FreeBSD with GCC
- #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
+ #if !defined(__clang__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3))
#include <ext/hash_map>
#include <ext/hash_set>
#if !(defined(__APPLE__) && defined(__MACH__))
diff -ur opencollada.org/GeneratedSaxParser/include/GeneratedSaxParserPrerequisites.h opencollada/GeneratedSaxParser/include/GeneratedSaxParserPrerequisites.h
--- GeneratedSaxParser/include/GeneratedSaxParserPrerequisites.h 2014-05-13 10:37:05.029390239 +0200
+++ GeneratedSaxParser/include/GeneratedSaxParserPrerequisites.h 2014-05-13 10:37:37.093390617 +0200
@@ -11,8 +11,6 @@
#ifndef __GENERATEDSAXPARSER_PREREQUISITES_H__
#define __GENERATEDSAXPARSER_PREREQUISITES_H__
-#define LIBXML_STATIC
-
#include <string>
#include "COLLADABUPlatform.h"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment