浏览代码

enable compiler switch test for no exporter requested.

Kim Kulling 7 年之前
父节点
当前提交
46caecdf35
共有 2 个文件被更改,包括 7 次插入3 次删除
  1. 5 3
      code/D3MFExporter.cpp
  2. 2 0
      code/D3MFExporter.h

+ 5 - 3
code/D3MFExporter.cpp

@@ -38,6 +38,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 ----------------------------------------------------------------------
 */
+#ifndef ASSIMP_BUILD_NO_EXPORT
+#ifndef ASSIMP_BUILD_NO_3MF_EXPORTER
+
 #include "D3MFExporter.h"
 
 #include <assimp/scene.h>
@@ -69,8 +72,6 @@ void ExportScene3MF( const char* pFile, IOSystem* pIOSystem, const aiScene* pSce
 
 namespace D3MF {
 
-#ifndef ASSIMP_BUILD_NO3MF_EXPORTER
-
 D3MFExporter::D3MFExporter( const char* pFile, const aiScene* pScene )
 : mArchiveName( pFile )
 , m_zipArchive( nullptr )
@@ -276,8 +277,9 @@ void D3MFExporter::writeRelInfoToFile( const std::string &folder, const std::str
     zip_entry_close( m_zipArchive );
 }
 
-#endif // ASSIMP_BUILD_NO3MF_EXPORTER
 
 } // Namespace D3MF
 } // Namespace Assimp
 
+#endif // ASSIMP_BUILD_NO3MF_EXPORTER
+#endif // ASSIMP_BUILD_NO_EXPORT

+ 2 - 0
code/D3MFExporter.h

@@ -58,6 +58,7 @@ class IOStream;
 
 namespace D3MF {
 
+#ifndef ASSIMP_BUILD_NO_EXPORT
 #ifndef ASSIMP_BUILD_NO3MF_EXPORTER
 
 struct OpcPackageRelationship;
@@ -92,6 +93,7 @@ private:
 };
 
 #endif // ASSIMP_BUILD_NO3MF_EXPORTER
+#endif // ASSIMP_BUILD_NO_EXPORT
 
 } // Namespace D3MF
 } // Namespace Assimp