mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 07:34:45 +00:00
Updated Assimp
Added initial behavior for ImageAssets to hold a list of GFX resources of different texture profiles to avoid mem leaks with incorrect-typed usages Added function to ImageAsset to get best-fit asset, allowing for fallbacks if the requested assetID is not found Added function to ShapeAsset to get best-fit asset, allowing for fallbacks if the requested assetID is not found Disabled fields for dynamic and static shadowmap refresh rates Moved noShape model to core/rendering/shapes to place it in a more logical module position Added an include to avoid undefined type compile error and removed unneeded semicolon from zone code Added call to reload probe textures when a reloadTextures call is made Adjusted default directional light shadowmap settings to not be as extreme Added utility function to probe manager to allow any class to request a 'best fit' list of probes that would affect a given location, allowing other classes such as fog or particles to utilize IBL. Also updated probeManager's forward rendering to utilize same function to reduce code duplication. Shifted shape loader code to utilize assimp for loader consistency and testing Changed render bin used for SSAO postfx so it runs at the right time Made Core_Rendering module scan for assets Updated loose file references to a number of assets to follow proper formatting Refactored asset import code to follow a more consistent object heirarchy structure on importing assets, allowing more reliable cross-referencing between inbound items Updated asset import logic for materials/images so that they properly utilize ImageType. Images correctly save out the assigned image type, materials reference the images' type to know what map slot they should be used in. Importer logic also updated to better find-and-add associated images based on type. Cleaned up a bunch of old, outdated code in the asset importer Added initial handling for in-place importing of files without needing to process them through the UI. Added ability to edit module script from RMB context menu if torsion path is set Updated list field code for variable inspector to utilize correct ownerObject field
This commit is contained in:
parent
2d015bc426
commit
6ade6f08ce
545 changed files with 15077 additions and 8437 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# Open Asset Import Library (assimp)
|
||||
# ----------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006-2019, assimp team
|
||||
# Copyright (c) 2006-2020, assimp team
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
|
|
@ -49,7 +49,7 @@ SET( HEADER_PATH ../include/assimp )
|
|||
if(NOT ANDROID AND ASSIMP_ANDROID_JNIIOSYSTEM)
|
||||
message(WARNING "Requesting Android JNI I/O-System in non-Android toolchain. Resetting ASSIMP_ANDROID_JNIIOSYSTEM to OFF.")
|
||||
set(ASSIMP_ANDROID_JNIIOSYSTEM OFF)
|
||||
endif(NOT ANDROID AND ASSIMP_ANDROID_JNIIOSYSTEM)
|
||||
endif()
|
||||
|
||||
SET( COMPILER_HEADERS
|
||||
${HEADER_PATH}/Compiler/pushpack1.h
|
||||
|
|
@ -66,6 +66,7 @@ SET( PUBLIC_HEADERS
|
|||
${HEADER_PATH}/color4.h
|
||||
${HEADER_PATH}/color4.inl
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../include/assimp/config.h
|
||||
${HEADER_PATH}/commonMetaData.h
|
||||
${HEADER_PATH}/defs.h
|
||||
${HEADER_PATH}/Defines.h
|
||||
${HEADER_PATH}/cfileio.h
|
||||
|
|
@ -147,7 +148,7 @@ SET( Core_SRCS
|
|||
|
||||
IF(MSVC)
|
||||
list(APPEND Core_SRCS "res/assimp.rc")
|
||||
ENDIF(MSVC)
|
||||
ENDIF()
|
||||
|
||||
SET( Logging_SRCS
|
||||
${HEADER_PATH}/DefaultLogger.hpp
|
||||
|
|
@ -184,8 +185,6 @@ SET( Common_SRCS
|
|||
Common/ScenePreprocessor.cpp
|
||||
Common/ScenePreprocessor.h
|
||||
Common/SkeletonMeshBuilder.cpp
|
||||
Common/SplitByBoneCountProcess.cpp
|
||||
Common/SplitByBoneCountProcess.h
|
||||
Common/StandardShapes.cpp
|
||||
Common/TargetAnimation.cpp
|
||||
Common/TargetAnimation.h
|
||||
|
|
@ -197,6 +196,7 @@ SET( Common_SRCS
|
|||
Common/CreateAnimMesh.cpp
|
||||
Common/simd.h
|
||||
Common/simd.cpp
|
||||
Common/material.cpp
|
||||
)
|
||||
SOURCE_GROUP(Common FILES ${Common_SRCS})
|
||||
|
||||
|
|
@ -220,7 +220,7 @@ IF ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER )
|
|||
C4D/C4DImporter.h
|
||||
)
|
||||
SOURCE_GROUP( C4D FILES ${C4D_SRCS})
|
||||
ENDIF ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER )
|
||||
ENDIF ()
|
||||
|
||||
# if this variable is set to TRUE, the user can manually disable importers by setting
|
||||
# ASSIMP_BUILD_XXX_IMPORTER to FALSE for each importer
|
||||
|
|
@ -250,35 +250,39 @@ MACRO(ADD_ASSIMP_IMPORTER name)
|
|||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
# if this variable is set to TRUE, the user can manually disable exporters by setting
|
||||
# ASSIMP_BUILD_XXX_EXPORTER to FALSE for each exporter
|
||||
# if this variable is set to FALSE, the user can manually enable exporters by setting
|
||||
# ASSIMP_BUILD_XXX_EXPORTER to TRUE for each exporter
|
||||
OPTION(ASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT "default value of all ASSIMP_BUILD_XXX_EXPORTER values" TRUE)
|
||||
if (NOT ASSIMP_NO_EXPORT)
|
||||
|
||||
# macro to add the CMake Option ADD_ASSIMP_IMPORTER_<name> which enables compile of loader
|
||||
# this way selective loaders can be compiled (reduces filesize + compile time)
|
||||
MACRO(ADD_ASSIMP_EXPORTER name)
|
||||
IF (ASSIMP_NO_EXPORT)
|
||||
set(ASSIMP_EXPORTER_ENABLED FALSE)
|
||||
ELSEIF (ASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT)
|
||||
set(ASSIMP_EXPORTER_ENABLED TRUE)
|
||||
IF (DEFINED ASSIMP_BUILD_${name}_EXPORTER AND NOT ASSIMP_BUILD_${name}_EXPORTER)
|
||||
# if this variable is set to TRUE, the user can manually disable exporters by setting
|
||||
# ASSIMP_BUILD_XXX_EXPORTER to FALSE for each exporter
|
||||
# if this variable is set to FALSE, the user can manually enable exporters by setting
|
||||
# ASSIMP_BUILD_XXX_EXPORTER to TRUE for each exporter
|
||||
OPTION(ASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT "default value of all ASSIMP_BUILD_XXX_EXPORTER values" TRUE)
|
||||
|
||||
# macro to add the CMake Option ADD_ASSIMP_IMPORTER_<name> which enables compile of loader
|
||||
# this way selective loaders can be compiled (reduces filesize + compile time)
|
||||
MACRO(ADD_ASSIMP_EXPORTER name)
|
||||
IF (ASSIMP_NO_EXPORT)
|
||||
set(ASSIMP_EXPORTER_ENABLED FALSE)
|
||||
ELSEIF (ASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT)
|
||||
set(ASSIMP_EXPORTER_ENABLED TRUE)
|
||||
IF (DEFINED ASSIMP_BUILD_${name}_EXPORTER AND NOT ASSIMP_BUILD_${name}_EXPORTER)
|
||||
set(ASSIMP_EXPORTER_ENABLED FALSE)
|
||||
ENDIF ()
|
||||
ELSE ()
|
||||
set(ASSIMP_EXPORTER_ENABLED ${ASSIMP_BUILD_${name}_EXPORTER})
|
||||
ENDIF ()
|
||||
ELSE ()
|
||||
set(ASSIMP_EXPORTER_ENABLED ${ASSIMP_BUILD_${name}_EXPORTER})
|
||||
ENDIF ()
|
||||
|
||||
IF (ASSIMP_EXPORTER_ENABLED)
|
||||
SET(ASSIMP_EXPORTERS_ENABLED "${ASSIMP_EXPORTERS_ENABLED} ${name}")
|
||||
LIST(APPEND ASSIMP_EXPORTER_SRCS ${ARGN})
|
||||
SOURCE_GROUP(${name}_EXPORTER FILES ${ARGN})
|
||||
ELSE()
|
||||
SET(ASSIMP_EXPORTERS_DISABLED "${ASSIMP_EXPORTERS_DISABLED} ${name}")
|
||||
add_definitions(-DASSIMP_BUILD_NO_${name}_EXPORTER)
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
IF (ASSIMP_EXPORTER_ENABLED)
|
||||
SET(ASSIMP_EXPORTERS_ENABLED "${ASSIMP_EXPORTERS_ENABLED} ${name}")
|
||||
LIST(APPEND ASSIMP_EXPORTER_SRCS ${ARGN})
|
||||
SOURCE_GROUP(${name}_EXPORTER FILES ${ARGN})
|
||||
ELSE()
|
||||
SET(ASSIMP_EXPORTERS_DISABLED "${ASSIMP_EXPORTERS_DISABLED} ${name}")
|
||||
add_definitions(-DASSIMP_BUILD_NO_${name}_EXPORTER)
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
endif()
|
||||
|
||||
SET(ASSIMP_LOADER_SRCS "")
|
||||
SET(ASSIMP_IMPORTERS_ENABLED "") # list of enabled importers
|
||||
|
|
@ -305,11 +309,6 @@ ADD_ASSIMP_IMPORTER( 3DS
|
|||
3DS/3DSLoader.h
|
||||
)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( 3DS
|
||||
3DS/3DSExporter.h
|
||||
3DS/3DSExporter.cpp
|
||||
)
|
||||
|
||||
ADD_ASSIMP_IMPORTER( AC
|
||||
AC/ACLoader.cpp
|
||||
AC/ACLoader.h
|
||||
|
|
@ -327,16 +326,6 @@ ADD_ASSIMP_IMPORTER( ASSBIN
|
|||
Assbin/AssbinLoader.cpp
|
||||
)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( ASSBIN
|
||||
Assbin/AssbinExporter.h
|
||||
Assbin/AssbinExporter.cpp
|
||||
)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( ASSXML
|
||||
Assxml/AssxmlExporter.h
|
||||
Assxml/AssxmlExporter.cpp
|
||||
)
|
||||
|
||||
ADD_ASSIMP_IMPORTER( B3D
|
||||
B3D/B3DImporter.cpp
|
||||
B3D/B3DImporter.h
|
||||
|
|
@ -348,6 +337,7 @@ ADD_ASSIMP_IMPORTER( BVH
|
|||
)
|
||||
|
||||
ADD_ASSIMP_IMPORTER( COLLADA
|
||||
Collada/ColladaHelper.cpp
|
||||
Collada/ColladaHelper.h
|
||||
Collada/ColladaLoader.cpp
|
||||
Collada/ColladaLoader.h
|
||||
|
|
@ -355,11 +345,6 @@ ADD_ASSIMP_IMPORTER( COLLADA
|
|||
Collada/ColladaParser.h
|
||||
)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( COLLADA
|
||||
Collada/ColladaExporter.h
|
||||
Collada/ColladaExporter.cpp
|
||||
)
|
||||
|
||||
ADD_ASSIMP_IMPORTER( DXF
|
||||
DXF/DXFLoader.cpp
|
||||
DXF/DXFLoader.h
|
||||
|
|
@ -411,14 +396,11 @@ ADD_ASSIMP_IMPORTER( M3D
|
|||
M3D/M3DMaterials.h
|
||||
M3D/M3DImporter.h
|
||||
M3D/M3DImporter.cpp
|
||||
M3D/M3DWrapper.h
|
||||
M3D/M3DWrapper.cpp
|
||||
M3D/m3d.h
|
||||
)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( M3D
|
||||
M3D/M3DExporter.h
|
||||
M3D/M3DExporter.cpp
|
||||
)
|
||||
|
||||
ADD_ASSIMP_IMPORTER( MD2
|
||||
MD2/MD2FileData.h
|
||||
MD2/MD2Loader.cpp
|
||||
|
|
@ -452,6 +434,16 @@ ADD_ASSIMP_IMPORTER( MDL
|
|||
MDL/MDLLoader.cpp
|
||||
MDL/MDLLoader.h
|
||||
MDL/MDLMaterialLoader.cpp
|
||||
MDL/HalfLife/HalfLifeMDLBaseHeader.h
|
||||
MDL/HalfLife/HL1FileData.h
|
||||
MDL/HalfLife/HL1MDLLoader.cpp
|
||||
MDL/HalfLife/HL1MDLLoader.h
|
||||
MDL/HalfLife/HL1ImportDefinitions.h
|
||||
MDL/HalfLife/HL1ImportSettings.h
|
||||
MDL/HalfLife/HL1MeshTrivert.h
|
||||
MDL/HalfLife/LogFunctions.h
|
||||
MDL/HalfLife/UniqueNameGenerator.cpp
|
||||
MDL/HalfLife/UniqueNameGenerator.h
|
||||
)
|
||||
|
||||
SET( MaterialSystem_SRCS
|
||||
|
|
@ -486,11 +478,6 @@ ADD_ASSIMP_IMPORTER( OBJ
|
|||
Obj/ObjTools.h
|
||||
)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( OBJ
|
||||
Obj/ObjExporter.h
|
||||
Obj/ObjExporter.cpp
|
||||
)
|
||||
|
||||
ADD_ASSIMP_IMPORTER( OGRE
|
||||
Ogre/OgreImporter.h
|
||||
Ogre/OgreStructs.h
|
||||
|
|
@ -510,11 +497,6 @@ ADD_ASSIMP_IMPORTER( OPENGEX
|
|||
OpenGEX/OpenGEXStructs.h
|
||||
)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( OPENGEX
|
||||
OpenGEX/OpenGEXExporter.cpp
|
||||
OpenGEX/OpenGEXExporter.h
|
||||
)
|
||||
|
||||
ADD_ASSIMP_IMPORTER( PLY
|
||||
Ply/PlyLoader.cpp
|
||||
Ply/PlyLoader.h
|
||||
|
|
@ -522,11 +504,6 @@ ADD_ASSIMP_IMPORTER( PLY
|
|||
Ply/PlyParser.h
|
||||
)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( PLY
|
||||
Ply/PlyExporter.cpp
|
||||
Ply/PlyExporter.h
|
||||
)
|
||||
|
||||
ADD_ASSIMP_IMPORTER( MS3D
|
||||
MS3D/MS3DLoader.cpp
|
||||
MS3D/MS3DLoader.h
|
||||
|
|
@ -580,7 +557,7 @@ if (ASSIMP_BUILD_IFC_IMPORTER)
|
|||
elseif(CMAKE_COMPILER_IS_MINGW)
|
||||
set_source_files_properties(Importer/IFC/IFCReaderGen1_2x3.cpp Importer/IFC/IFCReaderGen2_2x3.cpp PROPERTIES COMPILE_FLAGS "-O2 -Wa,-mbig-obj")
|
||||
endif()
|
||||
endif (ASSIMP_BUILD_IFC_IMPORTER)
|
||||
endif ()
|
||||
|
||||
ADD_ASSIMP_IMPORTER( XGL
|
||||
XGL/XGLLoader.cpp
|
||||
|
|
@ -616,14 +593,86 @@ ADD_ASSIMP_IMPORTER( FBX
|
|||
FBX/FBXCommon.h
|
||||
)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( FBX
|
||||
FBX/FBXExporter.h
|
||||
FBX/FBXExporter.cpp
|
||||
FBX/FBXExportNode.h
|
||||
FBX/FBXExportNode.cpp
|
||||
FBX/FBXExportProperty.h
|
||||
FBX/FBXExportProperty.cpp
|
||||
)
|
||||
if (NOT ASSIMP_NO_EXPORT)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( OBJ
|
||||
Obj/ObjExporter.h
|
||||
Obj/ObjExporter.cpp)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( OPENGEX
|
||||
OpenGEX/OpenGEXExporter.cpp
|
||||
OpenGEX/OpenGEXExporter.h)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( PLY
|
||||
Ply/PlyExporter.cpp
|
||||
Ply/PlyExporter.h)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( 3DS
|
||||
3DS/3DSExporter.h
|
||||
3DS/3DSExporter.cpp)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( ASSBIN
|
||||
Assbin/AssbinExporter.h
|
||||
Assbin/AssbinExporter.cpp
|
||||
Assbin/AssbinFileWriter.h
|
||||
Assbin/AssbinFileWriter.cpp)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( ASSXML
|
||||
Assxml/AssxmlExporter.h
|
||||
Assxml/AssxmlExporter.cpp
|
||||
Assxml/AssxmlFileWriter.h
|
||||
Assxml/AssxmlFileWriter.cpp)
|
||||
|
||||
ADD_ASSIMP_EXPORTER(M3D
|
||||
M3D/M3DExporter.h
|
||||
M3D/M3DExporter.cpp)
|
||||
|
||||
ADD_ASSIMP_EXPORTER(COLLADA
|
||||
Collada/ColladaExporter.h
|
||||
Collada/ColladaExporter.cpp)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( FBX
|
||||
FBX/FBXExporter.h
|
||||
FBX/FBXExporter.cpp
|
||||
FBX/FBXExportNode.h
|
||||
FBX/FBXExportNode.cpp
|
||||
FBX/FBXExportProperty.h
|
||||
FBX/FBXExportProperty.cpp)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( STL
|
||||
STL/STLExporter.h
|
||||
STL/STLExporter.cpp)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( X
|
||||
X/XFileExporter.h
|
||||
X/XFileExporter.cpp)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( X3D
|
||||
X3D/X3DExporter.cpp
|
||||
X3D/X3DExporter.hpp)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( GLTF
|
||||
glTF/glTFExporter.h
|
||||
glTF/glTFExporter.cpp
|
||||
glTF2/glTF2Exporter.h
|
||||
glTF2/glTF2Exporter.cpp)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( 3MF
|
||||
3MF/D3MFExporter.h
|
||||
3MF/D3MFExporter.cpp)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( ASSJSON
|
||||
Assjson/cencode.c
|
||||
Assjson/cencode.h
|
||||
Assjson/json_exporter.cpp
|
||||
Assjson/mesh_splitter.cpp
|
||||
Assjson/mesh_splitter.h)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( STEP
|
||||
Step/StepExporter.h
|
||||
Step/StepExporter.cpp)
|
||||
|
||||
endif()
|
||||
|
||||
SET( PostProcessing_SRCS
|
||||
PostProcessing/CalcTangentsProcess.cpp
|
||||
|
|
@ -686,6 +735,8 @@ SET( PostProcessing_SRCS
|
|||
PostProcessing/ArmaturePopulate.h
|
||||
PostProcessing/GenBoundingBoxesProcess.cpp
|
||||
PostProcessing/GenBoundingBoxesProcess.h
|
||||
PostProcessing/SplitByBoneCountProcess.cpp
|
||||
PostProcessing/SplitByBoneCountProcess.h
|
||||
)
|
||||
SOURCE_GROUP( PostProcessing FILES ${PostProcessing_SRCS})
|
||||
|
||||
|
|
@ -725,11 +776,6 @@ ADD_ASSIMP_IMPORTER( STL
|
|||
STL/STLLoader.h
|
||||
)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( STL
|
||||
STL/STLExporter.h
|
||||
STL/STLExporter.cpp
|
||||
)
|
||||
|
||||
ADD_ASSIMP_IMPORTER( TERRAGEN
|
||||
Terragen/TerragenLoader.cpp
|
||||
Terragen/TerragenLoader.h
|
||||
|
|
@ -748,11 +794,6 @@ ADD_ASSIMP_IMPORTER( X
|
|||
X/XFileParser.h
|
||||
)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( X
|
||||
X/XFileExporter.h
|
||||
X/XFileExporter.cpp
|
||||
)
|
||||
|
||||
ADD_ASSIMP_IMPORTER( X3D
|
||||
X3D/X3DImporter.cpp
|
||||
X3D/X3DImporter.hpp
|
||||
|
|
@ -773,11 +814,6 @@ ADD_ASSIMP_IMPORTER( X3D
|
|||
X3D/X3DVocabulary.cpp
|
||||
)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( X3D
|
||||
X3D/X3DExporter.cpp
|
||||
X3D/X3DExporter.hpp
|
||||
)
|
||||
|
||||
ADD_ASSIMP_IMPORTER( GLTF
|
||||
glTF/glTFCommon.h
|
||||
glTF/glTFCommon.cpp
|
||||
|
|
@ -795,13 +831,6 @@ ADD_ASSIMP_IMPORTER( GLTF
|
|||
glTF2/glTF2Importer.h
|
||||
)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( GLTF
|
||||
glTF/glTFExporter.h
|
||||
glTF/glTFExporter.cpp
|
||||
glTF2/glTF2Exporter.h
|
||||
glTF2/glTF2Exporter.cpp
|
||||
)
|
||||
|
||||
ADD_ASSIMP_IMPORTER( 3MF
|
||||
3MF/D3MFImporter.h
|
||||
3MF/D3MFImporter.cpp
|
||||
|
|
@ -810,11 +839,6 @@ ADD_ASSIMP_IMPORTER( 3MF
|
|||
3MF/3MFXmlTags.h
|
||||
)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( 3MF
|
||||
3MF/D3MFExporter.h
|
||||
3MF/D3MFExporter.cpp
|
||||
)
|
||||
|
||||
ADD_ASSIMP_IMPORTER( MMD
|
||||
MMD/MMDCpp14.h
|
||||
MMD/MMDImporter.cpp
|
||||
|
|
@ -825,14 +849,6 @@ ADD_ASSIMP_IMPORTER( MMD
|
|||
MMD/MMDVmdParser.h
|
||||
)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( ASSJSON
|
||||
Assjson/cencode.c
|
||||
Assjson/cencode.h
|
||||
Assjson/json_exporter.cpp
|
||||
Assjson/mesh_splitter.cpp
|
||||
Assjson/mesh_splitter.h
|
||||
)
|
||||
|
||||
# Workaround for issue #2406 - force problematic large file to be optimized to prevent string table overflow error
|
||||
# Used -Os instead of -O2 as previous issues had mentioned, since -Os is roughly speaking -O2, excluding any
|
||||
# optimizations that take up extra space. Given that the issue is a string table overflowing, -Os seemed appropriate
|
||||
|
|
@ -855,11 +871,6 @@ ADD_ASSIMP_IMPORTER( STEP
|
|||
Importer/StepFile/StepReaderGen.h
|
||||
)
|
||||
|
||||
ADD_ASSIMP_EXPORTER( STEP
|
||||
Step/StepExporter.h
|
||||
Step/StepExporter.cpp
|
||||
)
|
||||
|
||||
if ((NOT ASSIMP_NO_EXPORT) OR (NOT ASSIMP_EXPORTERS_ENABLED STREQUAL ""))
|
||||
SET( Exporter_SRCS
|
||||
Common/Exporter.cpp
|
||||
|
|
@ -878,35 +889,35 @@ SOURCE_GROUP( Extra FILES ${Extra_SRCS})
|
|||
IF(HUNTER_ENABLED)
|
||||
hunter_add_package(irrXML)
|
||||
find_package(irrXML CONFIG REQUIRED)
|
||||
ELSE(HUNTER_ENABLED)
|
||||
ELSE()
|
||||
# irrXML already included in contrib directory by parent CMakeLists.txt.
|
||||
ENDIF(HUNTER_ENABLED)
|
||||
ENDIF()
|
||||
|
||||
# utf8
|
||||
IF(HUNTER_ENABLED)
|
||||
hunter_add_package(utf8)
|
||||
find_package(utf8 CONFIG REQUIRED)
|
||||
ELSE(HUNTER_ENABLED)
|
||||
ELSE()
|
||||
# utf8 is header-only, so Assimp doesn't need to do anything.
|
||||
ENDIF(HUNTER_ENABLED)
|
||||
ENDIF()
|
||||
|
||||
# polyclipping
|
||||
IF(HUNTER_ENABLED)
|
||||
hunter_add_package(polyclipping)
|
||||
find_package(polyclipping CONFIG REQUIRED)
|
||||
ELSE(HUNTER_ENABLED)
|
||||
ELSE()
|
||||
SET( Clipper_SRCS
|
||||
../contrib/clipper/clipper.hpp
|
||||
../contrib/clipper/clipper.cpp
|
||||
)
|
||||
SOURCE_GROUP( Contrib\\Clipper FILES ${Clipper_SRCS})
|
||||
ENDIF(HUNTER_ENABLED)
|
||||
ENDIF()
|
||||
|
||||
# poly2tri
|
||||
IF(HUNTER_ENABLED)
|
||||
hunter_add_package(poly2tri)
|
||||
find_package(poly2tri CONFIG REQUIRED)
|
||||
ELSE(HUNTER_ENABLED)
|
||||
ELSE()
|
||||
SET( Poly2Tri_SRCS
|
||||
../contrib/poly2tri/poly2tri/common/shapes.cc
|
||||
../contrib/poly2tri/poly2tri/common/shapes.h
|
||||
|
|
@ -921,13 +932,13 @@ ELSE(HUNTER_ENABLED)
|
|||
../contrib/poly2tri/poly2tri/sweep/sweep_context.h
|
||||
)
|
||||
SOURCE_GROUP( Contrib\\Poly2Tri FILES ${Poly2Tri_SRCS})
|
||||
ENDIF(HUNTER_ENABLED)
|
||||
ENDIF()
|
||||
|
||||
# minizip/unzip
|
||||
IF(HUNTER_ENABLED)
|
||||
hunter_add_package(minizip)
|
||||
find_package(minizip CONFIG REQUIRED)
|
||||
ELSE(HUNTER_ENABLED)
|
||||
ELSE()
|
||||
SET( unzip_SRCS
|
||||
../contrib/unzip/crypt.h
|
||||
../contrib/unzip/ioapi.c
|
||||
|
|
@ -936,13 +947,13 @@ ELSE(HUNTER_ENABLED)
|
|||
../contrib/unzip/unzip.h
|
||||
)
|
||||
SOURCE_GROUP(Contrib\\unzip FILES ${unzip_SRCS})
|
||||
ENDIF(HUNTER_ENABLED)
|
||||
ENDIF()
|
||||
|
||||
# zip (https://github.com/kuba--/zip)
|
||||
IF(HUNTER_ENABLED)
|
||||
hunter_add_package(zip)
|
||||
find_package(zip CONFIG REQUIRED)
|
||||
ELSE(HUNTER_ENABLED)
|
||||
ELSE()
|
||||
SET( ziplib_SRCS
|
||||
../contrib/zip/src/miniz.h
|
||||
../contrib/zip/src/zip.c
|
||||
|
|
@ -957,13 +968,13 @@ ELSE(HUNTER_ENABLED)
|
|||
endif()
|
||||
|
||||
SOURCE_GROUP( ziplib FILES ${ziplib_SRCS} )
|
||||
ENDIF(HUNTER_ENABLED)
|
||||
ENDIF()
|
||||
|
||||
# openddlparser
|
||||
IF(HUNTER_ENABLED)
|
||||
hunter_add_package(openddlparser)
|
||||
find_package(openddlparser CONFIG REQUIRED)
|
||||
ELSE(HUNTER_ENABLED)
|
||||
ELSE()
|
||||
SET ( openddl_parser_SRCS
|
||||
../contrib/openddlparser/code/OpenDDLParser.cpp
|
||||
../contrib/openddlparser/code/DDLNode.cpp
|
||||
|
|
@ -980,12 +991,12 @@ ELSE(HUNTER_ENABLED)
|
|||
../contrib/openddlparser/include/openddlparser/Value.h
|
||||
)
|
||||
SOURCE_GROUP( Contrib\\openddl_parser FILES ${openddl_parser_SRCS})
|
||||
ENDIF(HUNTER_ENABLED)
|
||||
ENDIF()
|
||||
|
||||
# Open3DGC
|
||||
IF(HUNTER_ENABLED)
|
||||
# Nothing to do, not available in Hunter yet.
|
||||
ELSE(HUNTER_ENABLED)
|
||||
ELSE()
|
||||
SET ( open3dgc_SRCS
|
||||
../contrib/Open3DGC/o3dgcAdjacencyInfo.h
|
||||
../contrib/Open3DGC/o3dgcArithmeticCodec.cpp
|
||||
|
|
@ -1018,7 +1029,7 @@ ELSE(HUNTER_ENABLED)
|
|||
../contrib/Open3DGC/o3dgcVector.inl
|
||||
)
|
||||
SOURCE_GROUP( Contrib\\open3dgc FILES ${open3dgc_SRCS})
|
||||
ENDIF(HUNTER_ENABLED)
|
||||
ENDIF()
|
||||
|
||||
# Check dependencies for glTF importer with Open3DGC-compression.
|
||||
# RT-extensions is used in "contrib/Open3DGC/o3dgcTimer.h" for collecting statistics. Pointed file
|
||||
|
|
@ -1037,40 +1048,42 @@ ENDIF ()
|
|||
IF(HUNTER_ENABLED)
|
||||
hunter_add_package(RapidJSON)
|
||||
find_package(RapidJSON CONFIG REQUIRED)
|
||||
ELSE(HUNTER_ENABLED)
|
||||
ELSE()
|
||||
INCLUDE_DIRECTORIES( "../contrib/rapidjson/include" )
|
||||
INCLUDE_DIRECTORIES( "../contrib" )
|
||||
ENDIF(HUNTER_ENABLED)
|
||||
ENDIF()
|
||||
|
||||
# VC2010 fixes
|
||||
if(MSVC10)
|
||||
option( VC10_STDINT_FIX "Fix for VC10 Compiler regarding pstdint.h redefinition errors" OFF )
|
||||
if( VC10_STDINT_FIX )
|
||||
ADD_DEFINITIONS( -D_STDINT )
|
||||
endif( VC10_STDINT_FIX )
|
||||
endif(MSVC10)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
ADD_DEFINITIONS( -DASSIMP_BUILD_DLL_EXPORT )
|
||||
|
||||
if ( MSVC )
|
||||
ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
|
||||
ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
|
||||
endif ( MSVC )
|
||||
endif ()
|
||||
|
||||
IF(NOT HUNTER_ENABLED)
|
||||
if (UNZIP_FOUND)
|
||||
SET (unzip_compile_SRCS "")
|
||||
else (UNZIP_FOUND)
|
||||
else ()
|
||||
SET (unzip_compile_SRCS ${unzip_SRCS})
|
||||
INCLUDE_DIRECTORIES( "../contrib/unzip/" )
|
||||
endif (UNZIP_FOUND)
|
||||
ENDIF(NOT HUNTER_ENABLED)
|
||||
endif ()
|
||||
ENDIF()
|
||||
|
||||
MESSAGE(STATUS "Enabled importer formats:${ASSIMP_IMPORTERS_ENABLED}")
|
||||
MESSAGE(STATUS "Disabled importer formats:${ASSIMP_IMPORTERS_DISABLED}")
|
||||
|
||||
MESSAGE(STATUS "Enabled exporter formats:${ASSIMP_EXPORTERS_ENABLED}")
|
||||
MESSAGE(STATUS "Disabled exporter formats:${ASSIMP_EXPORTERS_DISABLED}")
|
||||
if (NOT ASSIMP_NO_EXPORT)
|
||||
MESSAGE(STATUS "Enabled exporter formats:${ASSIMP_EXPORTERS_ENABLED}")
|
||||
MESSAGE(STATUS "Disabled exporter formats:${ASSIMP_EXPORTERS_DISABLED}")
|
||||
endif()
|
||||
|
||||
SOURCE_GROUP( include\\assimp FILES ${PUBLIC_HEADERS} )
|
||||
|
||||
|
|
@ -1110,12 +1123,12 @@ IF(NOT HUNTER_ENABLED)
|
|||
${IRRXML_INCLUDE_DIR}
|
||||
../contrib/openddlparser/include
|
||||
)
|
||||
ENDIF(NOT HUNTER_ENABLED)
|
||||
ENDIF()
|
||||
|
||||
IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
|
||||
SET( assimp_src ${assimp_src} ${C4D_SRCS})
|
||||
INCLUDE_DIRECTORIES(${C4D_INCLUDES})
|
||||
ENDIF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
|
||||
ENDIF ()
|
||||
|
||||
ADD_LIBRARY( assimp ${assimp_src} )
|
||||
ADD_LIBRARY(assimp::assimp ALIAS assimp)
|
||||
|
|
@ -1139,21 +1152,21 @@ IF(HUNTER_ENABLED)
|
|||
utf8::utf8
|
||||
zip::zip
|
||||
)
|
||||
ELSE(HUNTER_ENABLED)
|
||||
ELSE()
|
||||
TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES} ${IRRXML_LIBRARY} )
|
||||
ENDIF(HUNTER_ENABLED)
|
||||
ENDIF()
|
||||
|
||||
if(ASSIMP_ANDROID_JNIIOSYSTEM)
|
||||
set(ASSIMP_ANDROID_JNIIOSYSTEM_PATH port/AndroidJNI)
|
||||
add_subdirectory(../${ASSIMP_ANDROID_JNIIOSYSTEM_PATH}/ ../${ASSIMP_ANDROID_JNIIOSYSTEM_PATH}/)
|
||||
target_link_libraries(assimp android_jniiosystem)
|
||||
endif(ASSIMP_ANDROID_JNIIOSYSTEM)
|
||||
endif()
|
||||
|
||||
IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
|
||||
TARGET_LINK_LIBRARIES(assimp optimized ${C4D_RELEASE_LIBRARIES})
|
||||
TARGET_LINK_LIBRARIES(assimp debug ${C4D_DEBUG_LIBRARIES})
|
||||
TARGET_LINK_LIBRARIES(assimp ${C4D_EXTRA_LIBRARIES})
|
||||
ENDIF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
|
||||
ENDIF ()
|
||||
|
||||
if( MSVC )
|
||||
# in order to prevent DLL hell, each of the DLLs have to be suffixed with the major version and msvc prefix
|
||||
|
|
@ -1199,10 +1212,6 @@ SET_TARGET_PROPERTIES( assimp PROPERTIES
|
|||
)
|
||||
|
||||
if (APPLE)
|
||||
SET_TARGET_PROPERTIES( assimp PROPERTIES
|
||||
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${ASSIMP_LIB_INSTALL_DIR}"
|
||||
)
|
||||
|
||||
if (BUILD_FRAMEWORK)
|
||||
SET_TARGET_PROPERTIES( assimp PROPERTIES
|
||||
FRAMEWORK TRUE
|
||||
|
|
@ -1218,8 +1227,8 @@ if (APPLE)
|
|||
"../${HEADER_PATH}/Compiler"
|
||||
assimp.framework/Headers/Compiler
|
||||
COMMENT "Copying public ./Compiler/ header files to framework bundle's Headers/Compiler/")
|
||||
ENDIF(BUILD_FRAMEWORK)
|
||||
ENDIF(APPLE)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# Build against external unzip, or add ../contrib/unzip so
|
||||
# assimp can #include "unzip.h"
|
||||
|
|
@ -1227,15 +1236,15 @@ IF(NOT HUNTER_ENABLED)
|
|||
if (UNZIP_FOUND)
|
||||
INCLUDE_DIRECTORIES(${UNZIP_INCLUDE_DIRS})
|
||||
TARGET_LINK_LIBRARIES(assimp ${UNZIP_LIBRARIES})
|
||||
else (UNZIP_FOUND)
|
||||
else ()
|
||||
INCLUDE_DIRECTORIES("../")
|
||||
endif (UNZIP_FOUND)
|
||||
ENDIF(NOT HUNTER_ENABLED)
|
||||
endif ()
|
||||
ENDIF()
|
||||
|
||||
# Add RT-extension library for glTF importer with Open3DGC-compression.
|
||||
IF (RT_FOUND AND ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC)
|
||||
TARGET_LINK_LIBRARIES(assimp ${RT_LIBRARY})
|
||||
ENDIF (RT_FOUND AND ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC)
|
||||
ENDIF ()
|
||||
|
||||
IF(HUNTER_ENABLED)
|
||||
INSTALL( TARGETS assimp
|
||||
|
|
@ -1246,14 +1255,14 @@ IF(HUNTER_ENABLED)
|
|||
FRAMEWORK DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
||||
COMPONENT ${LIBASSIMP_COMPONENT}
|
||||
INCLUDES DESTINATION "include")
|
||||
ELSE(HUNTER_ENABLED)
|
||||
ELSE()
|
||||
INSTALL( TARGETS assimp
|
||||
LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
||||
RUNTIME DESTINATION ${ASSIMP_BIN_INSTALL_DIR}
|
||||
FRAMEWORK DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
||||
COMPONENT ${LIBASSIMP_COMPONENT})
|
||||
ENDIF(HUNTER_ENABLED)
|
||||
ENDIF()
|
||||
INSTALL( FILES ${PUBLIC_HEADERS} DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}/assimp COMPONENT assimp-dev)
|
||||
INSTALL( FILES ${COMPILER_HEADERS} DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}/assimp/Compiler COMPONENT assimp-dev)
|
||||
|
||||
|
|
@ -1261,7 +1270,7 @@ if (ASSIMP_ANDROID_JNIIOSYSTEM)
|
|||
INSTALL(FILES ${HEADER_PATH}/${ASSIMP_ANDROID_JNIIOSYSTEM_PATH}/AndroidJNIIOSystem.h
|
||||
DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}
|
||||
COMPONENT assimp-dev)
|
||||
ENDIF(ASSIMP_ANDROID_JNIIOSYSTEM)
|
||||
ENDIF()
|
||||
|
||||
if(MSVC AND ASSIMP_INSTALL_PDB)
|
||||
# When only the static library is built, these properties must
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue