From 17fc3eea8f890ad8e48f5e8664f75e03c38d9671 Mon Sep 17 00:00:00 2001 From: Mika Rautio Date: Mon, 5 Dec 2016 11:12:46 +0200 Subject: [PATCH] Do not build exporter if its importer is not built --- code/CMakeLists.txt | 1 + code/Exporter.cpp | 2 +- code/XFileExporter.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 17a30502a..4a201a536 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -197,6 +197,7 @@ MACRO(ADD_ASSIMP_IMPORTER name) SET(${name}_SRC "") SET(ASSIMP_IMPORTERS_DISABLED "${ASSIMP_IMPORTERS_DISABLED} ${name}") add_definitions(-DASSIMP_BUILD_NO_${name}_IMPORTER) + add_definitions(-DASSIMP_BUILD_NO_${name}_EXPORTER) ENDIF() ENDMACRO() diff --git a/code/Exporter.cpp b/code/Exporter.cpp index e6ab20fdf..bdfea82b6 100644 --- a/code/Exporter.cpp +++ b/code/Exporter.cpp @@ -101,7 +101,7 @@ Exporter::ExportFormatEntry gExporters[] = Exporter::ExportFormatEntry( "collada", "COLLADA - Digital Asset Exchange Schema", "dae", &ExportSceneCollada), #endif -#ifndef ASSIMP_BUILD_NO_XFILE_EXPORTER +#ifndef ASSIMP_BUILD_NO_X_EXPORTER Exporter::ExportFormatEntry( "x", "X Files", "x", &ExportSceneXFile, aiProcess_MakeLeftHanded | aiProcess_FlipWindingOrder | aiProcess_FlipUVs), #endif diff --git a/code/XFileExporter.cpp b/code/XFileExporter.cpp index e3a46a1da..eeb5a1de1 100644 --- a/code/XFileExporter.cpp +++ b/code/XFileExporter.cpp @@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef ASSIMP_BUILD_NO_EXPORT -#ifndef ASSIMP_BUILD_NO_XFILE_EXPORTER +#ifndef ASSIMP_BUILD_NO_X_EXPORTER #include "XFileExporter.h" #include "ConvertToLHProcess.h" #include "Bitmap.h"