assimp/code/CMakeLists.txt

599 lines
12 KiB
CMake

SET( LIBRARY_VERSION "2.0.0" )
SET( LIBRARY_SOVERSION "2" )
#
# Listing and grouping of all the source files.
# 1) Set the file lists for each component
# 2) Create a Source Group for each component, for IDE project orginization
# 3) Add libassimp using the file lists (eliminates duplication of file names between
# source groups and library command)
#
SET( HEADER_PATH ../include )
SET( COMPILER_HEADERS
${HEADER_PATH}/Compiler/pushpack1.h
${HEADER_PATH}/Compiler/poppack1.h
pstdint.h
)
SOURCE_GROUP( Compiler FILES ${COMPILER_HEADERS})
SET( PUBLIC_HEADERS
${HEADER_PATH}/aiAnim.h
${HEADER_PATH}/aiAssert.h
${HEADER_PATH}/aiCamera.h
${HEADER_PATH}/aiColor4D.h
${HEADER_PATH}/aiColor4D.inl
${HEADER_PATH}/aiConfig.h
${HEADER_PATH}/aiDefines.h
${HEADER_PATH}/aiFileIO.h
${HEADER_PATH}/aiLight.h
${HEADER_PATH}/aiMaterial.h
${HEADER_PATH}/aiMaterial.inl
${HEADER_PATH}/aiMatrix3x3.h
${HEADER_PATH}/aiMatrix3x3.inl
${HEADER_PATH}/aiMatrix4x4.h
${HEADER_PATH}/aiMatrix4x4.inl
${HEADER_PATH}/aiMesh.h
${HEADER_PATH}/aiPostProcess.h
${HEADER_PATH}/aiQuaternion.h
${HEADER_PATH}/aiScene.h
${HEADER_PATH}/aiTexture.h
${HEADER_PATH}/aiTypes.h
${HEADER_PATH}/aiVector2D.h
${HEADER_PATH}/aiVector3D.h
${HEADER_PATH}/aiVector3D.inl
${HEADER_PATH}/aiVersion.h
${HEADER_PATH}/assimp.h
${HEADER_PATH}/assimp.hpp
${HEADER_PATH}/DefaultLogger.h
${HEADER_PATH}/ProgressHandler.h
${HEADER_PATH}/IOStream.h
${HEADER_PATH}/IOSystem.h
${HEADER_PATH}/Logger.h
${HEADER_PATH}/LogStream.h
${HEADER_PATH}/NullLogger.h
${HEADER_PATH}/export.h
${HEADER_PATH}/export.hpp
)
SET( Core_SRCS
Assimp.cpp
AssimpPCH.cpp
AssimpPCH.h
)
SET( Boost_SRCS
BoostWorkaround/boost/math/common_factor_rt.hpp
BoostWorkaround/boost/foreach.hpp
BoostWorkaround/boost/format.hpp
BoostWorkaround/boost/scoped_array.hpp
BoostWorkaround/boost/scoped_ptr.hpp
BoostWorkaround/boost/shared_array.hpp
BoostWorkaround/boost/shared_ptr.hpp
BoostWorkaround/boost/static_assert.hpp
BoostWorkaround/boost/tuple/tuple.hpp
)
SOURCE_GROUP(Boost FILES ${Boost_SRCS})
SET( Logging_SRCS
${HEADER_PATH}/DefaultLogger.h
${HEADER_PATH}/IOStream.h
${HEADER_PATH}/LogStream.h
${HEADER_PATH}/Logger.h
${HEADER_PATH}/NullLogger.h
Win32DebugLogStream.h
DefaultLogger.cpp
FileLogStream.h
)
SOURCE_GROUP(Logging FILES ${Logging_SRCS})
SET( Common_SRCS
fast_atof.h
qnan.h
BaseImporter.cpp
BaseImporter.h
BaseProcess.cpp
BaseProcess.h
ByteSwap.h
DefaultProgressHandler.h
DefaultIOStream.cpp
DefaultIOStream.h
DefaultIOSystem.cpp
DefaultIOSystem.h
CInterfaceIOWrapper.h
Hash.h
Importer.cpp
IFF.h
ParsingUtils.h
StdOStreamLogStream.h
StreamReader.h
StringComparison.h
SGSpatialSort.cpp
SGSpatialSort.h
VertexTriangleAdjacency.cpp
VertexTriangleAdjacency.h
GenericProperty.h
SpatialSort.cpp
SpatialSort.h
SceneCombiner.cpp
SceneCombiner.h
ScenePreprocessor.cpp
ScenePreprocessor.h
SkeletonMeshBuilder.cpp
SkeletonMeshBuilder.h
SplitByBoneCountProcess.cpp
SplitByBoneCountProcess.h
SmoothingGroups.h
StandardShapes.cpp
StandardShapes.h
TargetAnimation.cpp
TargetAnimation.h
RemoveComments.cpp
RemoveComments.h
Subdivision.cpp
Subdivision.h
Vertex.h
LineSplitter.h
TinyFormatter.h
Profiler.h
LogAux.h
)
SOURCE_GROUP(Common FILES ${Common_SRCS})
SET( 3DS_SRCS
3DSConverter.cpp
3DSHelper.h
3DSLoader.cpp
3DSLoader.h
)
SOURCE_GROUP(3DS FILES ${3DS_SRCS})
SET( AC_SRCS
ACLoader.cpp
ACLoader.h
)
SOURCE_GROUP( AC FILES ${AC_SRCS})
SET( ASE_SRCS
ASELoader.cpp
ASELoader.h
ASEParser.cpp
ASEParser.h
)
SOURCE_GROUP( ASE FILES ${ASE_SRCS})
SET( B3D_SRCS
B3DImporter.cpp
B3DImporter.h
)
SOURCE_GROUP( B3D FILES ${B3D_SRCS})
SET( BVH_SRCS
BVHLoader.cpp
BVHLoader.h
)
SOURCE_GROUP( BVH FILES ${BVH_SRCS})
SET( Collada_SRCS
ColladaHelper.h
ColladaLoader.cpp
ColladaLoader.h
ColladaParser.cpp
ColladaParser.h
ColladaExporter.h
ColladaExporter.cpp
)
SOURCE_GROUP( Collada FILES ${Collada_SRCS})
SET( DXF_SRCS
DXFLoader.cpp
DXFLoader.h
DXFHelper.h
)
SOURCE_GROUP( DXF FILES ${DXF_SRCS})
SET( CSM_SRCS
CSMLoader.cpp
CSMLoader.h
)
SOURCE_GROUP( CSM FILES ${CSM_SRCS})
SET( HMP_SRCS
HMPFileData.h
HMPLoader.cpp
HMPLoader.h
HalfLifeFileData.h
)
SOURCE_GROUP( HMP FILES ${HMP_SRCS})
SET( Irr_SRCS
IRRLoader.cpp
IRRLoader.h
IRRMeshLoader.cpp
IRRMeshLoader.h
IRRShared.cpp
IRRShared.h
)
SOURCE_GROUP( Irr FILES ${Irr_SRCS})
SET( LWO_SRCS
LWOAnimation.cpp
LWOAnimation.h
LWOBLoader.cpp
LWOFileData.h
LWOLoader.cpp
LWOLoader.h
LWOMaterial.cpp
)
SOURCE_GROUP( LWO FILES ${LWO_SRCS})
SET( LWS_SRCS
LWSLoader.cpp
LWSLoader.h
)
SOURCE_GROUP( LWS FILES ${LWS_SRCS})
SET( MD2_SRCS
MD2FileData.h
MD2Loader.cpp
MD2Loader.h
MD2NormalTable.h
)
SOURCE_GROUP( MD2 FILES ${MD2_SRCS})
SET( MD3_SRCS
MD3FileData.h
MD3Loader.cpp
MD3Loader.h
)
SOURCE_GROUP( MD3 FILES ${MD3_SRCS})
SET( MD5_SRCS
MD5Loader.cpp
MD5Loader.h
MD5Parser.cpp
MD5Parser.h
)
SOURCE_GROUP( MD5 FILES ${MD5_SRCS})
SET( MDC_SRCS
MDCFileData.h
MDCLoader.cpp
MDCLoader.h
MDCNormalTable.h
)
SOURCE_GROUP( MDC FILES ${MDC_SRCS})
SET( MDL_SRCS
MDLDefaultColorMap.h
MDLFileData.h
MDLLoader.cpp
MDLLoader.h
MDLMaterialLoader.cpp
)
SOURCE_GROUP( MDL FILES ${MDL_SRCS})
SET( MaterialSystem_SRCS
MaterialSystem.cpp
MaterialSystem.h
)
SOURCE_GROUP( MaterialSystem FILES ${MaterialSystem_SRCS})
SET( NFF_SRCS
NFFLoader.cpp
NFFLoader.h
)
SOURCE_GROUP( NFF FILES ${NFF_SRCS})
SET( NDO_SRCS
NDOLoader.cpp
NDOLoader.h
)
SOURCE_GROUP( NDO FILES ${NDO_SRCS})
SET( OFFFormat_SRCS
OFFLoader.cpp
OFFLoader.h
)
SOURCE_GROUP( OFFFormat FILES ${OFFFormat_SRCS})
SET( Obj_SRCS
ObjFileData.h
ObjFileImporter.cpp
ObjFileImporter.h
ObjFileMtlImporter.cpp
ObjFileMtlImporter.h
ObjFileParser.cpp
ObjFileParser.h
ObjTools.h
)
SOURCE_GROUP( Obj FILES ${Obj_SRCS})
SET( Ogre_SRCS
OgreImporter.h
OgreImporter.cpp
OgreImporterMaterial.cpp
)
SOURCE_GROUP( Ogre FILES ${Ogre_SRCS})
SET( Ply_SRCS
PlyLoader.cpp
PlyLoader.h
PlyParser.cpp
PlyParser.h
)
SOURCE_GROUP( Ply FILES ${Ply_SRCS})
SET(MS3D_SRCS
MS3DLoader.cpp
MS3DLoader.h
)
SOURCE_GROUP( MS3D FILES ${MS3D_SRCS})
SET(COB_SRCS
COBLoader.cpp
COBLoader.h
COBScene.h
)
SOURCE_GROUP( COB FILES ${COB_SRCS})
SET(BLENDER_SRCS
BlenderLoader.cpp
BlenderLoader.h
BlenderDNA.cpp
BlenderDNA.h
BlenderDNA.inl
BlenderScene.cpp
BlenderScene.h
BlenderSceneGen.h
BlenderIntermediate.h
BlenderModifier.h
BlenderModifier.cpp
)
SOURCE_GROUP( BLENDEr FILES ${BLENDER_SRCS})
SET(IFC_SRCS
IFCLoader.cpp
IFCLoader.h
IFCReaderGen.cpp
IFCReaderGen.h
STEPFile.h
STEPFileReader.h
STEPFileReader.cpp
)
SOURCE_GROUP( IFC FILES ${IFC_SRCS})
SET( PostProcessing_SRCS
CalcTangentsProcess.cpp
CalcTangentsProcess.h
ComputeUVMappingProcess.cpp
ComputeUVMappingProcess.h
ConvertToLHProcess.cpp
ConvertToLHProcess.h
FindDegenerates.cpp
FindDegenerates.h
FindInstancesProcess.cpp
FindInstancesProcess.h
FindInvalidDataProcess.cpp
FindInvalidDataProcess.h
FixNormalsStep.cpp
FixNormalsStep.h
GenFaceNormalsProcess.cpp
GenFaceNormalsProcess.h
GenVertexNormalsProcess.cpp
GenVertexNormalsProcess.h
PretransformVertices.cpp
PretransformVertices.h
ImproveCacheLocality.cpp
ImproveCacheLocality.h
JoinVerticesProcess.cpp
JoinVerticesProcess.h
LimitBoneWeightsProcess.cpp
LimitBoneWeightsProcess.h
RemoveRedundantMaterials.cpp
RemoveRedundantMaterials.h
RemoveVCProcess.cpp
RemoveVCProcess.h
SortByPTypeProcess.cpp
SortByPTypeProcess.h
SplitLargeMeshes.cpp
SplitLargeMeshes.h
TerragenLoader.cpp
TerragenLoader.h
TextureTransform.cpp
TextureTransform.h
TriangulateProcess.cpp
TriangulateProcess.h
ValidateDataStructure.cpp
ValidateDataStructure.h
OptimizeGraph.cpp
OptimizeGraph.h
OptimizeMeshes.cpp
OptimizeMeshes.h
DeboneProcess.cpp
DeboneProcess.h
ProcessHelper.h
ProcessHelper.cpp
PolyTools.h
)
SOURCE_GROUP( PostProcessing FILES ${PostProcessing_SRCS})
SET( Q3D_SRCS
Q3DLoader.cpp
Q3DLoader.h
)
SOURCE_GROUP( Q3D FILES ${Q3D_SRCS})
SET( Q3BSP_SRCS
Q3BSPFileData.h
Q3BSPFileParser.h
Q3BSPFileParser.cpp
Q3BSPFileImporter.h
Q3BSPFileImporter.cpp
Q3BSPZipArchive.h
Q3BSPZipArchive.cpp
)
SOURCE_GROUP( Q3BSP FILES ${Q3BSP_SRCS})
SET( Raw_SRCS
RawLoader.cpp
RawLoader.h
)
SOURCE_GROUP( Raw FILES ${Raw_SRCS})
SET( SMD_SRCS
SMDLoader.cpp
SMDLoader.h
)
SOURCE_GROUP( SMD FILES ${SMD_SRCS})
SET( STL_SRCS
STLLoader.cpp
STLLoader.h
)
SOURCE_GROUP( STL FILES ${STL_SRCS})
SET( Unreal_SRCS
UnrealLoader.cpp
UnrealLoader.h
)
SOURCE_GROUP( Unreal FILES ${Unreal_SRCS})
SET( XFile_SRCS
XFileHelper.h
XFileImporter.cpp
XFileImporter.h
XFileParser.cpp
XFileParser.h
)
SOURCE_GROUP( XFile FILES ${XFile_SRCS})
SET( Exporter_SRCS
Exporter.cpp
AssimpCExport.cpp
BlobIOSystem.h
)
SOURCE_GROUP( Exporter FILES ${Exporter_SRCS})
SET( Extra_SRCS
MakeVerboseFormat.cpp
MakeVerboseFormat.h
MD4FileData.h
)
SOURCE_GROUP( Extra FILES ${Extra_SRCS})
SET( IrrXML_SRCS
irrXMLWrapper.h
../contrib/irrXML/CXMLReaderImpl.h
../contrib/irrXML/heapsort.h
../contrib/irrXML/irrArray.h
../contrib/irrXML/irrString.h
../contrib/irrXML/irrTypes.h
../contrib/irrXML/irrXML.cpp
../contrib/irrXML/irrXML.h
)
SOURCE_GROUP( IrrXML FILES ${IrrXML_SRCS})
SET( ConvertUTF_SRCS
../contrib/ConvertUTF/ConvertUTF.h
../contrib/ConvertUTF/ConvertUTF.c
)
SOURCE_GROUP( ConvertUTF FILES ${ConvertUTF_SRCS})
SET( unzip_SRCS
../contrib/unzip/crypt.h
../contrib/unzip/ioapi.c
../contrib/unzip/ioapi.h
../contrib/unzip/unzip.c
../contrib/unzip/unzip.h
)
SOURCE_GROUP( unzip FILES ${unzip_SRCS})
ADD_DEFINITIONS( -DASSIMP_BUILD_DLL_EXPORT )
if ( MSVC80 OR MSVC90 OR MSVC10 )
ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
endif ( MSVC80 OR MSVC90 OR MSVC10 )
if (UNZIP_FOUND)
SET (unzip_compile_SRCS "")
else (UNZIP_FOUND)
SET (unzip_compile_SRCS ${unzip_SRCS})
endif (UNZIP_FOUND)
ADD_LIBRARY( assimp SHARED
# Assimp Files
${Core_SRCS}
${Common_SRCS}
${Logging_SRCS}
${Exporter_SRCS}
${PostProcessing_SRCS}
# Model Support
${3DS_SRCS}
${AC_SRCS}
${ASE_SRCS}
${B3D_SRCS}
${BVH_SRCS}
${Collada_SRCS}
${DXF_SRCS}
${CSM_SRCS}
${HMP_SRCS}
${Irr_SRCS}
${LWO_SRCS}
${LWS_SRCS}
${MD2_SRCS}
${MD3_SRCS}
${MD5_SRCS}
${MDC_SRCS}
${MDL_SRCS}
${MaterialSystem_SRCS}
${NFF_SRCS}
${OFFFormat_SRCS}
${Obj_SRCS}
${Ogre_SRCS}
${Ply_SRCS}
${Q3D_SRCS}
${Q3BSP_SRCS}
${Raw_SRCS}
${SMD_SRCS}
${STL_SRCS}
${Unreal_SRCS}
${XFile_SRCS}
${Extra_SRCS}
${MS3D_SRCS}
${COB_SRCS}
${BLENDER_SRCS}
${NDO_SRCS}
${IFC_SRCS}
# Third-party libraries
${IrrXML_SRCS}
${ConvertUTF_SRCS}
${unzip_compile_SRCS}
# Necessary to show the headers in the project when using the VC++ generator:
${Boost_SRCS}
${PUBLIC_HEADERS}
${COMPILER_HEADERS}
)
TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES})
SET_TARGET_PROPERTIES( assimp PROPERTIES
VERSION ${LIBRARY_VERSION}
SOVERSION ${LIBRARY_SOVERSION}
)
# Build against external unzip, or add ../contrib/unzip so
# assimp can #include "unzip.h"
if (UNZIP_FOUND)
INCLUDE_DIRECTORIES(${UNZIP_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(assimp ${UNZIP_LIBRARIES})
else (UNZIP_FOUND)
INCLUDE_DIRECTORIES("../contrib/unzip")
endif (UNZIP_FOUND)
INSTALL( TARGETS assimp DESTINATION ${LIB_INSTALL_DIR} COMPONENT libassimp${ASSIMP_VERSION_MAJOR})
INSTALL( FILES ${PUBLIC_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/assimp COMPONENT assimp-dev)
INSTALL( FILES ${COMPILER_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/assimp/Compiler COMPONENT assimp-dev)