[Bf-blender-cvs] [3552731551e] master: Fix (devtalk 4053): Collada build with older cmake versions broken
Gaia Clary
noreply at git.blender.org
Wed Dec 5 22:04:44 CET 2018
Commit: 3552731551ef1845b493ffebf78be5a42527e9f2
Author: Gaia Clary
Date: Wed Dec 5 22:04:10 2018 +0100
Branches: master
https://developer.blender.org/rB3552731551ef1845b493ffebf78be5a42527e9f2
Fix (devtalk 4053): Collada build with older cmake versions broken
===================================================================
M source/blender/collada/CMakeLists.txt
M source/blender/collada/DocumentImporter.cpp
M source/blender/collada/DocumentImporter.h
===================================================================
diff --git a/source/blender/collada/CMakeLists.txt b/source/blender/collada/CMakeLists.txt
index c250384b989..fd38998c98c 100644
--- a/source/blender/collada/CMakeLists.txt
+++ b/source/blender/collada/CMakeLists.txt
@@ -24,8 +24,7 @@
# ***** END GPL LICENSE BLOCK *****
remove_strict_flags()
-
-FIND_FILE(_opencollada_with_animation_clip
+FIND_FILE(OPENCOLLADA_ANIMATION_CLIP
NAMES
COLLADAFWAnimationClip.h
PATHS
@@ -33,8 +32,11 @@ FIND_FILE(_opencollada_with_animation_clip
NO_DEFAULT_PATH
)
-IF(_opencollada_with_animation_clip)
- add_compile_definitions(OPENCOLLADA_WITH_ANIMATION_CLIP)
+IF(OPENCOLLADA_ANIMATION_CLIP)
+ message(STATUS "Found opencollada: ${OPENCOLLADA_ANIMATION_CLIP} ")
+ add_definitions(-DWITH_OPENCOLLADA_ANIMATION_CLIP)
+ELSE()
+ message(STATUS "opencollada: Build without animation clip support")
ENDIF()
set(INC
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp
index 7f93dd4823f..c3b2108c35b 100644
--- a/source/blender/collada/DocumentImporter.cpp
+++ b/source/blender/collada/DocumentImporter.cpp
@@ -1349,7 +1349,7 @@ bool DocumentImporter::writeAnimationList(const COLLADAFW::AnimationList *animat
return anim_importer.write_animation_list(animationList);
}
-#if OPENCOLLADA_WITH_ANIMATION_CLIP
+#if WITH_OPENCOLLADA_ANIMATION_CLIP
// Since opencollada 1.6.68
// called on post-process stage after writeVisualScenes
bool DocumentImporter::writeAnimationClip(const COLLADAFW::AnimationClip *animationClip)
diff --git a/source/blender/collada/DocumentImporter.h b/source/blender/collada/DocumentImporter.h
index 084a7ca984d..68a67005ff0 100644
--- a/source/blender/collada/DocumentImporter.h
+++ b/source/blender/collada/DocumentImporter.h
@@ -106,7 +106,7 @@ public:
bool writeAnimationList(const COLLADAFW::AnimationList*);
-#if OPENCOLLADA_WITH_ANIMATION_CLIP
+#if WITH_OPENCOLLADA_ANIMATION_CLIP
// Please enable this when building with Collada 1.6.65 or newer (also in DocumentImporter.cpp)
bool writeAnimationClip(const COLLADAFW::AnimationClip *animationClip);
#endif
More information about the Bf-blender-cvs
mailing list