Browse Source

Merge pull request #876 from assimp/travisfix

Fix travis compile: glTFImporter chokes on unavailability of WriteLaz…
Alexander Gessler 9 years ago
parent
commit
92b1431be3
3 changed files with 7 additions and 0 deletions
  1. 6 0
      code/glTFAsset.h
  2. 1 0
      code/glTFAssetWriter.h
  3. BIN
      test/regression/db.zip

+ 6 - 0
code/glTFAsset.h

@@ -756,15 +756,19 @@ namespace glTF
         virtual void AttachToDocument(Document& doc) = 0;
         virtual void DetachFromDocument() = 0;
 
+#ifdef  GLTF_ASSET_WITH_EXPORT_SUPPORT
         virtual void WriteObjects(AssetWriter& writer) = 0;
+#endif
     };
 
+#ifdef GLTF_ASSET_WITH_EXPORT_SUPPORT
     template<class T>
     class LazyDict;
 
     //! (Implemented in glTFAssetWriter.h)
     template<class T>
     void WriteLazyDict(LazyDict<T>& d, AssetWriter& w);
+#endif
 
     //! Manages lazy loading of the glTF top-level objects, and keeps a reference to them by ID
     //! It is the owner the loaded objects, so when it is destroyed it also deletes them
@@ -786,8 +790,10 @@ namespace glTF
         void AttachToDocument(Document& doc);
         void DetachFromDocument();
 
+#ifdef  GLTF_ASSET_WITH_EXPORT_SUPPORT
         void WriteObjects(AssetWriter& writer)
             { WriteLazyDict<T>(*this, writer); }
+#endif
 
         Ref<T> Add(T* obj);
 

+ 1 - 0
code/glTFAssetWriter.h

@@ -48,6 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef glTFAssetWriter_H_INC
 #define glTFAssetWriter_H_INC
 
+#define GLTF_ASSET_WITH_EXPORT_SUPPORT
 #include "glTFAsset.h"
 
 namespace glTF

BIN
test/regression/db.zip