summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.fetch1
-rw-r--r--RepositoryExternal.mk16
-rw-r--r--download.lst2
-rw-r--r--external/Module_external.mk1
-rw-r--r--external/collada2gltf/GitSHA1.cpp2
-rw-r--r--external/collada2gltf/Makefile14
-rw-r--r--external/collada2gltf/Module_collada2gltf.mk17
-rw-r--r--external/collada2gltf/README4
-rw-r--r--external/collada2gltf/StaticLibrary_collada2gltf.mk100
-rw-r--r--external/collada2gltf/UnpackedTarball_collada2gltf.mk16
10 files changed, 173 insertions, 0 deletions
diff --git a/Makefile.fetch b/Makefile.fetch
index 3cbf6af49be0..3683fdf4a181 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -114,6 +114,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)
$(call fetch_Optional,CLUCENE,CLUCENE_TARBALL) \
$(call fetch_Optional,CMIS,CMIS_TARBALL) \
$(call fetch_Optional,COINMP,COINMP_TARBALL) \
+ $(call fetch_Optional,COLLADA2GLTF,COLLADA2GLTF_TARBALL) \
$(call fetch_Optional,CPPUNIT,CPPUNIT_TARBALL) \
$(call fetch_Optional,CT2N,CT2N_TARBALL) \
$(call fetch_Optional,CURL,CURL_TARBALL) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index f49b98f078e3..6e2d19b0b6c6 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3134,6 +3134,22 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\
)
endef
+define gb_LinkTarget__use_collada2gltf
+$(call gb_LinkTarget_set_include,$(1),\
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson/ \
+ $$(INCLUDE) \
+)
+
+$(call gb_LinkTarget_use_static_libraries,$(1),\
+ collada2gltf \
+)
+endef
+
endif
### Jars ############################################################
diff --git a/download.lst b/download.lst
index 97750493e704..9e9be304d163 100644
--- a/download.lst
+++ b/download.lst
@@ -17,6 +17,8 @@ export CLUCENE_TARBALL := 48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.
export CMIS_TARBALL := 22f8a85daf4a012180322e1f52a7563b-libcmis-0.4.1.tar.gz
export COINMP_MD5SUM := 1cce53bf4b40ae29790d2c5c9f8b1129
export COINMP_TARBALL := CoinMP-1.7.6.tgz
+export COLLADA2GLTF_MD5SUM := c8a8be5829ceffacfe1d68d078f5c442
+export COLLADA2GLTF_TARBALL := collada2gltf-master-6258611a6a.tar.bz2
export CPPUNIT_TARBALL := ac4781e01619be13461bb2d562b94a7b-cppunit-1.13.1.tar.gz
export CT2N_TARBALL := 451ccf439a36a568653b024534669971-ConvertTextToNumber-1.3.2.oxt
export CURL_MD5SUM := e6d1f9d1b59da5062109ffe14e0569a4
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 728aef0c92b3..4f9dde6a6144 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -31,6 +31,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,CLUCENE,clucene) \
$(call gb_Helper_optional,CMIS,libcmis) \
$(call gb_Helper_optional,COINMP,coinmp) \
+ $(call gb_Helper_optional,COLLADA2GLTF,collada2gltf) \
$(call gb_Helper_optional,CPPUNIT,cppunit) \
$(call gb_Helper_optional,CT2N,ct2n) \
$(call gb_Helper_optional,CURL,curl) \
diff --git a/external/collada2gltf/GitSHA1.cpp b/external/collada2gltf/GitSHA1.cpp
new file mode 100644
index 000000000000..bd2cffe1f375
--- /dev/null
+++ b/external/collada2gltf/GitSHA1.cpp
@@ -0,0 +1,2 @@
+#define GIT_SHA1 "6258611a6a4b4b94b963db5f1fe41c5290be1f87"
+char g_GIT_SHA1[] = GIT_SHA1;
diff --git a/external/collada2gltf/Makefile b/external/collada2gltf/Makefile
new file mode 100644
index 000000000000..569ad8a0ba7a
--- /dev/null
+++ b/external/collada2gltf/Makefile
@@ -0,0 +1,14 @@
+# -*- 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:
diff --git a/external/collada2gltf/Module_collada2gltf.mk b/external/collada2gltf/Module_collada2gltf.mk
new file mode 100644
index 000000000000..789a8cb64530
--- /dev/null
+++ b/external/collada2gltf/Module_collada2gltf.mk
@@ -0,0 +1,17 @@
+# -*- 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,collada2gltf))
+
+$(eval $(call gb_Module_add_targets,collada2gltf,\
+ StaticLibrary_collada2gltf \
+ UnpackedTarball_collada2gltf \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/collada2gltf/README b/external/collada2gltf/README
new file mode 100644
index 000000000000..15060554b103
--- /dev/null
+++ b/external/collada2gltf/README
@@ -0,0 +1,4 @@
+An open-source converter produces glTF assets from COLLADA using OpenCOLLADA.
+
+From:
+[https://github.com/amd/glTF/tree/master/converter/COLLADA2GLTF].
diff --git a/external/collada2gltf/StaticLibrary_collada2gltf.mk b/external/collada2gltf/StaticLibrary_collada2gltf.mk
new file mode 100644
index 000000000000..a25f63d9a5e9
--- /dev/null
+++ b/external/collada2gltf/StaticLibrary_collada2gltf.mk
@@ -0,0 +1,100 @@
+# -*- 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_StaticLibrary_StaticLibrary,collada2gltf))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,collada2gltf,collada2gltf))
+
+$(eval $(call gb_StaticLibrary_use_externals,collada2gltf, \
+ opencollada_parser \
+ png \
+))
+
+$(eval $(call gb_StaticLibrary_set_warnings_not_errors,collada2gltf))
+
+$(eval $(call gb_StaticLibrary_add_defs,collada2gltf,\
+ -DUSE_OPEN3DGC \
+))
+
+ifeq ($(COM),MSC)
+$(eval $(call gb_StaticLibrary_add_defs,collada2gltf,\
+ -D_CRT_SECURE_NO_WARNINGS \
+ -EHsc \
+))
+
+endif
+
+$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,collada2gltf,cpp))
+
+$(eval $(call gb_StaticLibrary_set_include,collada2gltf,\
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/convert \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/extensions/o3dgc-compression \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/profiles/webgl-1.0 \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/shaders \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,collada2gltf,\
+ UnpackedTarball/collada2gltf/COLLADA2GLTFWriter \
+ UnpackedTarball/collada2gltf/GitSHA1 \
+ UnpackedTarball/collada2gltf/GLTFOpenCOLLADAUtils \
+ UnpackedTarball/collada2gltf/assetModifiers/GLTFFlipUVModifier \
+ UnpackedTarball/collada2gltf/convert/meshConverter \
+ UnpackedTarball/collada2gltf/convert/animationConverter \
+ UnpackedTarball/collada2gltf/extensions/o3dgc-compression/GLTF-Open3DGC \
+ UnpackedTarball/collada2gltf/GLTF/GLTFAccessor \
+ UnpackedTarball/collada2gltf/GLTF/GLTFAccessorCache \
+ UnpackedTarball/collada2gltf/GLTF/GLTFAsset \
+ UnpackedTarball/collada2gltf/GLTF/GLTFAnimation \
+ UnpackedTarball/collada2gltf/GLTF/GLTFBuffer \
+ UnpackedTarball/collada2gltf/GLTF/GLTFConfig \
+ UnpackedTarball/collada2gltf/GLTF/GLTFEffect \
+ UnpackedTarball/collada2gltf/GLTF/GLTFExtraDataHandler \
+ UnpackedTarball/collada2gltf/GLTF/GLTFInputStream \
+ UnpackedTarball/collada2gltf/GLTF/GLTFMesh \
+ UnpackedTarball/collada2gltf/GLTF/GLTFOutputStream \
+ UnpackedTarball/collada2gltf/GLTF/GLTFPrimitive \
+ UnpackedTarball/collada2gltf/GLTF/GLTFProfile \
+ UnpackedTarball/collada2gltf/GLTF/GLTFSkin \
+ UnpackedTarball/collada2gltf/GLTF/GLTFUtils \
+ UnpackedTarball/collada2gltf/GLTF/GLTFWriter \
+ UnpackedTarball/collada2gltf/helpers/geometryHelpers \
+ UnpackedTarball/collada2gltf/helpers/mathHelpers \
+ UnpackedTarball/collada2gltf/JSON/JSONArray \
+ UnpackedTarball/collada2gltf/JSON/JSONNumber \
+ UnpackedTarball/collada2gltf/JSON/JSONObject \
+ UnpackedTarball/collada2gltf/JSON/JSONString \
+ UnpackedTarball/collada2gltf/JSON/JSONValue \
+ UnpackedTarball/collada2gltf/profiles/webgl-1.0/GLTFWebGL_1_0_Profile \
+ UnpackedTarball/collada2gltf/shaders/commonProfileShaders \
+))
+
+# o3dgc external library compiled from collada2gltf
+$(eval $(call gb_StaticLibrary_set_include,collada2gltf,\
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/o3dgc/src/o3dgc_common_lib/inc \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/o3dgc/src/o3dgc_decode_lib/inc \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/o3dgc/src/o3dgc_encode_lib/inc \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,collada2gltf,\
+ UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_common_lib/src/o3dgcArithmeticCodec \
+ UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_common_lib/src/o3dgcTools \
+ UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_common_lib/src/o3dgcTriangleFans \
+ UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_decode_lib/src/o3dgcDynamicVectorDecoder \
+ UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_encode_lib/src/o3dgcDynamicVectorEncoder \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/collada2gltf/UnpackedTarball_collada2gltf.mk b/external/collada2gltf/UnpackedTarball_collada2gltf.mk
new file mode 100644
index 000000000000..92bc775e5989
--- /dev/null
+++ b/external/collada2gltf/UnpackedTarball_collada2gltf.mk
@@ -0,0 +1,16 @@
+# -*- 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,collada2gltf))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,collada2gltf,$(COLLADA2GLTF_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_add_file,collada2gltf,.,external/collada2gltf/GitSHA1.cpp))
+
+# vim: set noet sw=4 ts=4: