diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 92199c234..6d3cfb0fe 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -187,10 +187,16 @@ IF ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER ) SOURCE_GROUP( C4D FILES ${C4D_SRCS}) ENDIF ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER ) +# if this variable is set to TRUE, the user can manually disable importers by setting +# ASSIMP_BUILD_XXX_IMPORTER to FALSE for each importer +# if this variable is set to FALSE, the user can manually enable importers by setting +# ASSIMP_BUILD_XXX_IMPORTER to TRUE for each importer +OPTION(ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT "default value of all ASSIMP_BUILD_XXX_IMPORTER value" TRUE) + # macro to add the CMake Option ADD_ASSIMP_IMPORTER_ which enables compile of loader # this way selective loaders can be compiled (reduces filesize + compile time) MACRO(ADD_ASSIMP_IMPORTER name) - OPTION(ASSIMP_BUILD_${name}_IMPORTER "build the ${name} importer" TRUE) + OPTION(ASSIMP_BUILD_${name}_IMPORTER "build the ${name} importer" ${ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT}) IF(ASSIMP_BUILD_${name}_IMPORTER) LIST(APPEND ASSIMP_LOADER_SRCS ${ARGN}) SET(ASSIMP_IMPORTERS_ENABLED "${ASSIMP_IMPORTERS_ENABLED} ${name}") diff --git a/code/ImporterRegistry.cpp b/code/ImporterRegistry.cpp index 95a1867e0..f77193c2f 100644 --- a/code/ImporterRegistry.cpp +++ b/code/ImporterRegistry.cpp @@ -46,6 +46,9 @@ directly (unless you are adding new loaders), instead use the corresponding preprocessor flag to selectively disable formats. */ +#include +#include "BaseImporter.h" + // ------------------------------------------------------------------------------------------------ // Importers // (include_new_importers_here)