CMakeLists.txt 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  1. #
  2. # Listing and grouping of all the source files.
  3. # 1) Set the file lists for each component
  4. # 2) Create a Source Group for each component, for IDE project orginization
  5. # 3) Add libassimp using the file lists (eliminates duplication of file names between
  6. # source groups and library command)
  7. #
  8. # Modified by Lasse Oorni and Yao Wei Tjong for Urho3D
  9. if (MINGW)
  10. # The IFCReaderGen.cpp.obj has too many sections in DEBUG configuration build
  11. # Since GCC does not support /bigobj compiler flags as in MSVC, we use optimization flags to reduce the object file size
  12. set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O1")
  13. set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O1")
  14. endif ()
  15. INCLUDE_DIRECTORIES( code )
  16. INCLUDE_DIRECTORIES( include )
  17. INCLUDE_DIRECTORIES( code/BoostWorkaround )
  18. INCLUDE_DIRECTORIES( contrib/unzip )
  19. ADD_DEFINITIONS( -DASSIMP_BUILD_BOOST_WORKAROUND )
  20. SET( HEADER_PATH include/assimp )
  21. SET( COMPILER_HEADERS
  22. ${HEADER_PATH}/Compiler/pushpack1.h
  23. ${HEADER_PATH}/Compiler/poppack1.h
  24. ${HEADER_PATH}/Compiler/pstdint.h
  25. )
  26. SOURCE_GROUP( Compiler FILES ${COMPILER_HEADERS})
  27. SET( PUBLIC_HEADERS
  28. ${HEADER_PATH}/anim.h
  29. ${HEADER_PATH}/ai_assert.h
  30. ${HEADER_PATH}/camera.h
  31. ${HEADER_PATH}/color4.h
  32. ${HEADER_PATH}/color4.inl
  33. ${HEADER_PATH}/config.h
  34. ${HEADER_PATH}/defs.h
  35. ${HEADER_PATH}/cfileio.h
  36. ${HEADER_PATH}/light.h
  37. ${HEADER_PATH}/material.h
  38. ${HEADER_PATH}/material.inl
  39. ${HEADER_PATH}/matrix3x3.h
  40. ${HEADER_PATH}/matrix3x3.inl
  41. ${HEADER_PATH}/matrix4x4.h
  42. ${HEADER_PATH}/matrix4x4.inl
  43. ${HEADER_PATH}/mesh.h
  44. ${HEADER_PATH}/postprocess.h
  45. ${HEADER_PATH}/quaternion.h
  46. ${HEADER_PATH}/quaternion.inl
  47. ${HEADER_PATH}/scene.h
  48. ${HEADER_PATH}/metadata.h
  49. ${HEADER_PATH}/texture.h
  50. ${HEADER_PATH}/types.h
  51. ${HEADER_PATH}/vector2.h
  52. ${HEADER_PATH}/vector2.inl
  53. ${HEADER_PATH}/vector3.h
  54. ${HEADER_PATH}/vector3.inl
  55. ${HEADER_PATH}/version.h
  56. ${HEADER_PATH}/cimport.h
  57. ${HEADER_PATH}/importerdesc.h
  58. ${HEADER_PATH}/Importer.hpp
  59. ${HEADER_PATH}/DefaultLogger.hpp
  60. ${HEADER_PATH}/ProgressHandler.hpp
  61. ${HEADER_PATH}/IOStream.hpp
  62. ${HEADER_PATH}/IOSystem.hpp
  63. ${HEADER_PATH}/Logger.hpp
  64. ${HEADER_PATH}/LogStream.hpp
  65. ${HEADER_PATH}/NullLogger.hpp
  66. ${HEADER_PATH}/cexport.h
  67. ${HEADER_PATH}/Exporter.hpp
  68. )
  69. SET( Core_SRCS
  70. code/Assimp.cpp
  71. )
  72. SET( Boost_SRCS
  73. code/BoostWorkaround/boost/math/common_factor_rt.hpp
  74. code/BoostWorkaround/boost/foreach.hpp
  75. code/BoostWorkaround/boost/format.hpp
  76. code/BoostWorkaround/boost/scoped_array.hpp
  77. code/BoostWorkaround/boost/scoped_ptr.hpp
  78. code/BoostWorkaround/boost/shared_array.hpp
  79. code/BoostWorkaround/boost/shared_ptr.hpp
  80. code/BoostWorkaround/boost/make_shared.hpp
  81. code/BoostWorkaround/boost/static_assert.hpp
  82. code/BoostWorkaround/boost/tuple/tuple.hpp
  83. )
  84. SOURCE_GROUP(Boost FILES ${Boost_SRCS})
  85. SET( Logging_SRCS
  86. ${HEADER_PATH}/DefaultLogger.hpp
  87. ${HEADER_PATH}/LogStream.hpp
  88. ${HEADER_PATH}/Logger.hpp
  89. ${HEADER_PATH}/NullLogger.hpp
  90. code/Win32DebugLogStream.h
  91. code/DefaultLogger.cpp
  92. code/FileLogStream.h
  93. code/StdOStreamLogStream.h
  94. )
  95. SOURCE_GROUP(Logging FILES ${Logging_SRCS})
  96. SET( Common_SRCS
  97. code/fast_atof.h
  98. code/qnan.h
  99. code/BaseImporter.cpp
  100. code/BaseImporter.h
  101. code/BaseProcess.cpp
  102. code/BaseProcess.h
  103. code/Importer.h
  104. code/ScenePrivate.h
  105. code/PostStepRegistry.cpp
  106. code/ImporterRegistry.cpp
  107. code/ByteSwapper.h
  108. code/DefaultProgressHandler.h
  109. code/DefaultIOStream.cpp
  110. code/DefaultIOStream.h
  111. code/DefaultIOSystem.cpp
  112. code/DefaultIOSystem.h
  113. code/CInterfaceIOWrapper.h
  114. code/Hash.h
  115. code/Importer.cpp
  116. code/IFF.h
  117. code/MemoryIOWrapper.h
  118. code/ParsingUtils.h
  119. code/StreamReader.h
  120. code/StreamWriter.h
  121. code/StringComparison.h
  122. code/SGSpatialSort.cpp
  123. code/SGSpatialSort.h
  124. code/VertexTriangleAdjacency.cpp
  125. code/VertexTriangleAdjacency.h
  126. code/GenericProperty.h
  127. code/SpatialSort.cpp
  128. code/SpatialSort.h
  129. code/SceneCombiner.cpp
  130. code/SceneCombiner.h
  131. code/ScenePreprocessor.cpp
  132. code/ScenePreprocessor.h
  133. code/SkeletonMeshBuilder.cpp
  134. code/SkeletonMeshBuilder.h
  135. code/SplitByBoneCountProcess.cpp
  136. code/SplitByBoneCountProcess.h
  137. code/SmoothingGroups.h
  138. code/StandardShapes.cpp
  139. code/StandardShapes.h
  140. code/TargetAnimation.cpp
  141. code/TargetAnimation.h
  142. code/RemoveComments.cpp
  143. code/RemoveComments.h
  144. code/Subdivision.cpp
  145. code/Subdivision.h
  146. code/Vertex.h
  147. code/LineSplitter.h
  148. code/TinyFormatter.h
  149. code/Profiler.h
  150. code/LogAux.h
  151. code/Bitmap.cpp
  152. code/Bitmap.h
  153. code/XMLTools.h
  154. code/Version.cpp
  155. )
  156. SOURCE_GROUP(Common FILES ${Common_SRCS})
  157. IF ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER )
  158. SET( C4D_SRCS
  159. code/C4DImporter.cpp
  160. code/C4DImporter.h
  161. )
  162. SOURCE_GROUP( C4D FILES ${C4D_SRCS})
  163. ENDIF ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER )
  164. # macro to add the CMake Option ADD_ASSIMP_IMPORTER_<name> which enables compile of loader
  165. # this way selective loaders can be compiled (reduces filesize + compile time)
  166. MACRO(ADD_ASSIMP_IMPORTER name)
  167. OPTION(ASSIMP_BUILD_${name}_IMPORTER "build the ${name} importer" TRUE)
  168. IF(ASSIMP_BUILD_${name}_IMPORTER)
  169. LIST(APPEND ASSIMP_LOADER_SRCS ${ARGN})
  170. SET(ASSIMP_IMPORTERS_ENABLED "${ASSIMP_IMPORTERS_ENABLED} ${name}")
  171. SET(${name}_SRCS ${ARGN})
  172. SOURCE_GROUP(${name} FILES ${ARGN})
  173. ELSE()
  174. SET(${name}_SRC "")
  175. SET(ASSIMP_IMPORTERS_DISABLED "${ASSIMP_IMPORTERS_DISABLED} ${name}")
  176. add_definitions(-DASSIMP_BUILD_NO_${name}_IMPORTER)
  177. ENDIF()
  178. ENDMACRO()
  179. SET(ASSIMP_LOADER_SRCS "")
  180. SET(ASSIMP_IMPORTERS_ENABLED "") # list of enabled importers
  181. SET(ASSIMP_IMPORTERS_DISABLED "") # disabled list (used to print)
  182. ADD_ASSIMP_IMPORTER(3DS
  183. code/3DSConverter.cpp
  184. code/3DSHelper.h
  185. code/3DSLoader.cpp
  186. code/3DSLoader.h
  187. code/3DSExporter.h
  188. code/3DSExporter.cpp
  189. )
  190. ADD_ASSIMP_IMPORTER(AC
  191. code/ACLoader.cpp
  192. code/ACLoader.h
  193. )
  194. ADD_ASSIMP_IMPORTER(ASE
  195. code/ASELoader.cpp
  196. code/ASELoader.h
  197. code/ASEParser.cpp
  198. code/ASEParser.h
  199. )
  200. ADD_ASSIMP_IMPORTER(ASSBIN
  201. code/AssbinExporter.h
  202. code/AssbinExporter.cpp
  203. code/AssbinLoader.h
  204. code/AssbinLoader.cpp
  205. )
  206. ADD_ASSIMP_IMPORTER(ASSXML
  207. code/AssxmlExporter.h
  208. code/AssxmlExporter.cpp
  209. )
  210. ADD_ASSIMP_IMPORTER(B3D
  211. code/B3DImporter.cpp
  212. code/B3DImporter.h
  213. )
  214. ADD_ASSIMP_IMPORTER(BVH
  215. code/BVHLoader.cpp
  216. code/BVHLoader.h
  217. )
  218. ADD_ASSIMP_IMPORTER(COLLADA
  219. code/ColladaHelper.h
  220. code/ColladaLoader.cpp
  221. code/ColladaLoader.h
  222. code/ColladaParser.cpp
  223. code/ColladaParser.h
  224. code/ColladaExporter.h
  225. code/ColladaExporter.cpp
  226. )
  227. ADD_ASSIMP_IMPORTER(DXF
  228. code/DXFLoader.cpp
  229. code/DXFLoader.h
  230. code/DXFHelper.h
  231. )
  232. ADD_ASSIMP_IMPORTER(CSM
  233. code/CSMLoader.cpp
  234. code/CSMLoader.h
  235. )
  236. ADD_ASSIMP_IMPORTER(HMP
  237. code/HMPFileData.h
  238. code/HMPLoader.cpp
  239. code/HMPLoader.h
  240. code/HalfLifeFileData.h
  241. )
  242. #FIXME: allow to set IRRMESH by option
  243. ADD_ASSIMP_IMPORTER(IRR
  244. code/IRRLoader.cpp
  245. code/IRRLoader.h
  246. code/IRRMeshLoader.cpp
  247. code/IRRMeshLoader.h
  248. code/IRRShared.cpp
  249. code/IRRShared.h
  250. )
  251. ADD_ASSIMP_IMPORTER(LWO
  252. code/LWOAnimation.cpp
  253. code/LWOAnimation.h
  254. code/LWOBLoader.cpp
  255. code/LWOFileData.h
  256. code/LWOLoader.cpp
  257. code/LWOLoader.h
  258. code/LWOMaterial.cpp
  259. )
  260. ADD_ASSIMP_IMPORTER(LWS
  261. code/LWSLoader.cpp
  262. code/LWSLoader.h
  263. )
  264. ADD_ASSIMP_IMPORTER(MD2
  265. code/MD2FileData.h
  266. code/MD2Loader.cpp
  267. code/MD2Loader.h
  268. code/MD2NormalTable.h
  269. )
  270. ADD_ASSIMP_IMPORTER(MD3
  271. code/MD3FileData.h
  272. code/MD3Loader.cpp
  273. code/MD3Loader.h
  274. )
  275. ADD_ASSIMP_IMPORTER(MD5
  276. code/MD5Loader.cpp
  277. code/MD5Loader.h
  278. code/MD5Parser.cpp
  279. code/MD5Parser.h
  280. )
  281. ADD_ASSIMP_IMPORTER(MDC
  282. code/MDCFileData.h
  283. code/MDCLoader.cpp
  284. code/MDCLoader.h
  285. code/MDCNormalTable.h
  286. )
  287. ADD_ASSIMP_IMPORTER(MDL
  288. code/MDLDefaultColorMap.h
  289. code/MDLFileData.h
  290. code/MDLLoader.cpp
  291. code/MDLLoader.h
  292. code/MDLMaterialLoader.cpp
  293. )
  294. SET( MaterialSystem_SRCS
  295. code/MaterialSystem.cpp
  296. code/MaterialSystem.h
  297. )
  298. SOURCE_GROUP( MaterialSystem FILES ${MaterialSystem_SRCS})
  299. ADD_ASSIMP_IMPORTER(NFF
  300. code/NFFLoader.cpp
  301. code/NFFLoader.h
  302. )
  303. ADD_ASSIMP_IMPORTER(NDO
  304. code/NDOLoader.cpp
  305. code/NDOLoader.h
  306. )
  307. ADD_ASSIMP_IMPORTER(OFF
  308. code/OFFLoader.cpp
  309. code/OFFLoader.h
  310. )
  311. ADD_ASSIMP_IMPORTER(OBJ
  312. code/ObjFileData.h
  313. code/ObjFileImporter.cpp
  314. code/ObjFileImporter.h
  315. code/ObjFileMtlImporter.cpp
  316. code/ObjFileMtlImporter.h
  317. code/ObjFileParser.cpp
  318. code/ObjFileParser.h
  319. code/ObjTools.h
  320. code/ObjExporter.h
  321. code/ObjExporter.cpp
  322. )
  323. ADD_ASSIMP_IMPORTER(OGRE
  324. code/OgreImporter.h
  325. code/OgreStructs.h
  326. code/OgreParsingUtils.h
  327. code/OgreBinarySerializer.h
  328. code/OgreXmlSerializer.h
  329. code/OgreImporter.cpp
  330. code/OgreStructs.cpp
  331. code/OgreBinarySerializer.cpp
  332. code/OgreXmlSerializer.cpp
  333. code/OgreMaterial.cpp
  334. )
  335. # ATOMIC BEGIN
  336. # https://github.com/AtomicGameEngine/AtomicGameEngine/issues/1045
  337. # Disable as it depends on openddl which has problems
  338. # TODO: update to latest Assimp which includes fixes for openddl
  339. # Though we still don't use opengex
  340. #ADD_ASSIMP_IMPORTER(OPENGEX
  341. # code/OpenGEXExporter.cpp
  342. # code/OpenGEXExporter.h
  343. # code/OpenGEXImporter.cpp
  344. # code/OpenGEXImporter.h
  345. # code/OpenGEXStructs.h
  346. #)
  347. add_definitions(-DASSIMP_BUILD_NO_OPENGEX_IMPORTER=1)
  348. # ATOMIC END
  349. ADD_ASSIMP_IMPORTER(PLY
  350. code/PlyLoader.cpp
  351. code/PlyLoader.h
  352. code/PlyParser.cpp
  353. code/PlyParser.h
  354. code/PlyExporter.cpp
  355. code/PlyExporter.h
  356. )
  357. ADD_ASSIMP_IMPORTER(MS3D
  358. code/MS3DLoader.cpp
  359. code/MS3DLoader.h
  360. )
  361. ADD_ASSIMP_IMPORTER(COB
  362. code/COBLoader.cpp
  363. code/COBLoader.h
  364. code/COBScene.h
  365. )
  366. ADD_ASSIMP_IMPORTER(BLEND
  367. code/BlenderLoader.cpp
  368. code/BlenderLoader.h
  369. code/BlenderDNA.cpp
  370. code/BlenderDNA.h
  371. code/BlenderDNA.inl
  372. code/BlenderScene.cpp
  373. code/BlenderScene.h
  374. code/BlenderSceneGen.h
  375. code/BlenderIntermediate.h
  376. code/BlenderModifier.h
  377. code/BlenderModifier.cpp
  378. code/BlenderBMesh.h
  379. code/BlenderBMesh.cpp
  380. code/BlenderTessellator.h
  381. code/BlenderTessellator.cpp
  382. )
  383. ADD_ASSIMP_IMPORTER(IFC
  384. code/IFCLoader.cpp
  385. code/IFCLoader.h
  386. code/IFCReaderGen.cpp
  387. code/IFCReaderGen.h
  388. code/IFCUtil.h
  389. code/IFCUtil.cpp
  390. code/IFCGeometry.cpp
  391. code/IFCMaterial.cpp
  392. code/IFCProfile.cpp
  393. code/IFCCurve.cpp
  394. code/IFCBoolean.cpp
  395. code/IFCOpenings.cpp
  396. code/STEPFile.h
  397. code/STEPFileReader.h
  398. code/STEPFileReader.cpp
  399. code/STEPFileEncoding.cpp
  400. code/STEPFileEncoding.h
  401. )
  402. ADD_ASSIMP_IMPORTER(XGL
  403. code/XGLLoader.cpp
  404. code/XGLLoader.h
  405. )
  406. ADD_ASSIMP_IMPORTER(FBX
  407. code/FBXImporter.cpp
  408. code/FBXCompileConfig.h
  409. code/FBXImporter.h
  410. code/FBXParser.cpp
  411. code/FBXParser.h
  412. code/FBXTokenizer.cpp
  413. code/FBXTokenizer.h
  414. code/FBXImportSettings.h
  415. code/FBXConverter.h
  416. code/FBXConverter.cpp
  417. code/FBXUtil.h
  418. code/FBXUtil.cpp
  419. code/FBXDocument.h
  420. code/FBXDocument.cpp
  421. code/FBXProperties.h
  422. code/FBXProperties.cpp
  423. code/FBXMeshGeometry.cpp
  424. code/FBXMaterial.cpp
  425. code/FBXModel.cpp
  426. code/FBXAnimation.cpp
  427. code/FBXNodeAttribute.cpp
  428. code/FBXDeformer.cpp
  429. code/FBXBinaryTokenizer.cpp
  430. code/FBXDocumentUtil.cpp
  431. )
  432. SET( PostProcessing_SRCS
  433. code/CalcTangentsProcess.cpp
  434. code/CalcTangentsProcess.h
  435. code/ComputeUVMappingProcess.cpp
  436. code/ComputeUVMappingProcess.h
  437. code/ConvertToLHProcess.cpp
  438. code/ConvertToLHProcess.h
  439. code/FindDegenerates.cpp
  440. code/FindDegenerates.h
  441. code/FindInstancesProcess.cpp
  442. code/FindInstancesProcess.h
  443. code/FindInvalidDataProcess.cpp
  444. code/FindInvalidDataProcess.h
  445. code/FixNormalsStep.cpp
  446. code/FixNormalsStep.h
  447. code/GenFaceNormalsProcess.cpp
  448. code/GenFaceNormalsProcess.h
  449. code/GenVertexNormalsProcess.cpp
  450. code/GenVertexNormalsProcess.h
  451. code/PretransformVertices.cpp
  452. code/PretransformVertices.h
  453. code/ImproveCacheLocality.cpp
  454. code/ImproveCacheLocality.h
  455. code/JoinVerticesProcess.cpp
  456. code/JoinVerticesProcess.h
  457. code/LimitBoneWeightsProcess.cpp
  458. code/LimitBoneWeightsProcess.h
  459. code/RemoveRedundantMaterials.cpp
  460. code/RemoveRedundantMaterials.h
  461. code/RemoveVCProcess.cpp
  462. code/RemoveVCProcess.h
  463. code/SortByPTypeProcess.cpp
  464. code/SortByPTypeProcess.h
  465. code/SplitLargeMeshes.cpp
  466. code/SplitLargeMeshes.h
  467. code/TextureTransform.cpp
  468. code/TextureTransform.h
  469. code/TriangulateProcess.cpp
  470. code/TriangulateProcess.h
  471. code/ValidateDataStructure.cpp
  472. code/ValidateDataStructure.h
  473. code/OptimizeGraph.cpp
  474. code/OptimizeGraph.h
  475. code/OptimizeMeshes.cpp
  476. code/OptimizeMeshes.h
  477. code/DeboneProcess.cpp
  478. code/DeboneProcess.h
  479. code/ProcessHelper.h
  480. code/ProcessHelper.cpp
  481. code/PolyTools.h
  482. code/MakeVerboseFormat.cpp
  483. code/MakeVerboseFormat.h
  484. )
  485. SOURCE_GROUP( PostProcessing FILES ${PostProcessing_SRCS})
  486. ADD_ASSIMP_IMPORTER(Q3D
  487. code/Q3DLoader.cpp
  488. code/Q3DLoader.h
  489. )
  490. ADD_ASSIMP_IMPORTER(Q3BSP
  491. code/Q3BSPFileData.h
  492. code/Q3BSPFileParser.h
  493. code/Q3BSPFileParser.cpp
  494. code/Q3BSPFileImporter.h
  495. code/Q3BSPFileImporter.cpp
  496. code/Q3BSPZipArchive.h
  497. code/Q3BSPZipArchive.cpp
  498. )
  499. ADD_ASSIMP_IMPORTER(RAW
  500. code/RawLoader.cpp
  501. code/RawLoader.h
  502. )
  503. ADD_ASSIMP_IMPORTER(SMD
  504. code/SMDLoader.cpp
  505. code/SMDLoader.h
  506. )
  507. ADD_ASSIMP_IMPORTER(STL
  508. code/STLLoader.cpp
  509. code/STLLoader.h
  510. code/STLExporter.h
  511. code/STLExporter.cpp
  512. )
  513. ADD_ASSIMP_IMPORTER(TERRAGEN
  514. code/TerragenLoader.cpp
  515. code/TerragenLoader.h
  516. )
  517. ADD_ASSIMP_IMPORTER(3D
  518. code/UnrealLoader.cpp
  519. code/UnrealLoader.h
  520. )
  521. ADD_ASSIMP_IMPORTER(X
  522. code/XFileHelper.h
  523. code/XFileImporter.cpp
  524. code/XFileImporter.h
  525. code/XFileParser.cpp
  526. code/XFileParser.h
  527. code/XFileExporter.h
  528. code/XFileExporter.cpp
  529. )
  530. SET( Step_SRCS
  531. code/StepExporter.h
  532. code/StepExporter.cpp
  533. )
  534. SOURCE_GROUP( Step FILES ${Step_SRCS})
  535. SET( Exporter_SRCS
  536. code/Exporter.cpp
  537. code/AssimpCExport.cpp
  538. code/BlobIOSystem.h
  539. )
  540. SOURCE_GROUP( Exporter FILES ${Exporter_SRCS})
  541. SET( Extra_SRCS
  542. code/MD4FileData.h
  543. )
  544. SOURCE_GROUP( Extra FILES ${Extra_SRCS})
  545. SET( IrrXML_SRCS
  546. code/irrXMLWrapper.h
  547. contrib/irrXML/CXMLReaderImpl.h
  548. contrib/irrXML/heapsort.h
  549. contrib/irrXML/irrArray.h
  550. contrib/irrXML/irrString.h
  551. contrib/irrXML/irrTypes.h
  552. contrib/irrXML/irrXML.cpp
  553. contrib/irrXML/irrXML.h
  554. )
  555. SOURCE_GROUP( IrrXML FILES ${IrrXML_SRCS})
  556. SET( ConvertUTF_SRCS
  557. contrib/ConvertUTF/ConvertUTF.h
  558. contrib/ConvertUTF/ConvertUTF.c
  559. )
  560. SOURCE_GROUP( ConvertUTF FILES ${ConvertUTF_SRCS})
  561. SET( Clipper_SRCS
  562. contrib/clipper/clipper.hpp
  563. contrib/clipper/clipper.cpp
  564. )
  565. SOURCE_GROUP( Clipper FILES ${Clipper_SRCS})
  566. SET( Poly2Tri_SRCS
  567. contrib/poly2tri/poly2tri/common/shapes.cc
  568. contrib/poly2tri/poly2tri/common/shapes.h
  569. contrib/poly2tri/poly2tri/common/utils.h
  570. contrib/poly2tri/poly2tri/sweep/advancing_front.h
  571. contrib/poly2tri/poly2tri/sweep/advancing_front.cc
  572. contrib/poly2tri/poly2tri/sweep/cdt.cc
  573. contrib/poly2tri/poly2tri/sweep/cdt.h
  574. contrib/poly2tri/poly2tri/sweep/sweep.cc
  575. contrib/poly2tri/poly2tri/sweep/sweep.h
  576. contrib/poly2tri/poly2tri/sweep/sweep_context.cc
  577. contrib/poly2tri/poly2tri/sweep/sweep_context.h
  578. )
  579. SOURCE_GROUP( Poly2Tri FILES ${Poly2Tri_SRCS})
  580. SET( unzip_SRCS
  581. contrib/unzip/crypt.h
  582. contrib/unzip/ioapi.c
  583. contrib/unzip/ioapi.h
  584. contrib/unzip/unzip.c
  585. contrib/unzip/unzip.h
  586. )
  587. SOURCE_GROUP( unzip FILES ${unzip_SRCS})
  588. SET( zlib_SRCS
  589. contrib/zlib/adler32.c
  590. contrib/zlib/compress.c
  591. contrib/zlib/crc32.c
  592. contrib/zlib/crc32.h
  593. contrib/zlib/deflate.c
  594. contrib/zlib/deflate.h
  595. # contrib/zlib/gzclose.c
  596. # contrib/zlib/gzguts.h
  597. # contrib/zlib/gzlib.c
  598. # contrib/zlib/gzread.c
  599. # contrib/zlib/gzwrite.c
  600. contrib/zlib/infback.c
  601. contrib/zlib/inffast.c
  602. contrib/zlib/inffast.h
  603. contrib/zlib/inffixed.h
  604. contrib/zlib/inflate.c
  605. contrib/zlib/inflate.h
  606. contrib/zlib/inftrees.c
  607. contrib/zlib/inftrees.h
  608. contrib/zlib/trees.c
  609. contrib/zlib/trees.h
  610. contrib/zlib/uncompr.c
  611. contrib/zlib/zconf.h
  612. contrib/zlib/zlib.h
  613. contrib/zlib/zutil.c
  614. contrib/zlib/zutil.h
  615. )
  616. SOURCE_GROUP( zlib FILES ${zlib_SRCS})
  617. # ATOMIC BEGIN
  618. # https://github.com/AtomicGameEngine/AtomicGameEngine/issues/1045
  619. # Disable openddl which has problems
  620. # TODO: update to latest Assimp which includes fixes for openddl
  621. # Though we still don't use opengex
  622. #SET ( openddl_parser_SRCS
  623. # contrib/openddlparser/code/OpenDDLParser.cpp
  624. # contrib/openddlparser/code/DDLNode.cpp
  625. # contrib/openddlparser/code/Value.cpp
  626. # contrib/openddlparser/include/openddlparser/OpenDDLParser.h
  627. # contrib/openddlparser/include/openddlparser/OpenDDLParserUtils.h
  628. # contrib/openddlparser/include/openddlparser/OpenDDLCommon.h
  629. # contrib/openddlparser/include/openddlparser/DDLNode.h
  630. # contrib/openddlparser/include/openddlparser/Value.h
  631. #)
  632. #SOURCE_GROUP( openddl_parser FILES ${openddl_parser_SRCS})
  633. # VC2010 fixes
  634. if(MSVC10)
  635. option( VC10_STDINT_FIX "Fix for VC10 Compiler regarding pstdint.h redefinition errors" OFF )
  636. if( VC10_STDINT_FIX )
  637. ADD_DEFINITIONS( -D_STDINT )
  638. endif( VC10_STDINT_FIX )
  639. endif(MSVC10)
  640. if ( MSVC )
  641. ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
  642. ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
  643. endif ( MSVC )
  644. # Urho3D: disable status prints
  645. # MESSAGE(STATUS "Enabled formats:${ASSIMP_IMPORTERS_ENABLED}")
  646. # MESSAGE(STATUS "Disabled formats:${ASSIMP_IMPORTERS_DISABLED}")
  647. SET( SOURCE_FILES
  648. # Assimp Files
  649. ${Core_SRCS}
  650. ${Common_SRCS}
  651. ${Logging_SRCS}
  652. ${Exporter_SRCS}
  653. ${PostProcessing_SRCS}
  654. ${MaterialSystem_SRCS}
  655. ${Step_SRCS}
  656. # Model Support
  657. ${ASSIMP_LOADER_SRCS}
  658. # Third-party libraries
  659. ${IrrXML_SRCS}
  660. ${ConvertUTF_SRCS}
  661. ${unzip_SRCS}
  662. ${zlib_SRCS}
  663. ${Poly2Tri_SRCS}
  664. ${Clipper_SRCS}
  665. ${openddl_parser_SRCS}
  666. # Necessary to show the headers in the project when using the VC++ generator:
  667. ${Boost_SRCS}
  668. ${PUBLIC_HEADERS}
  669. ${COMPILER_HEADERS}
  670. )
  671. add_definitions( -DOPENDDLPARSER_BUILD )
  672. INCLUDE_DIRECTORIES(
  673. contrib/openddlparser/include
  674. )
  675. # Urho3D: set the corresponding "no importer" define
  676. IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
  677. SET( SOURCE_FILES ${SOURCE_FILES} ${C4D_SRCS})
  678. INCLUDE_DIRECTORIES(${C4D_INCLUDES})
  679. ELSE (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
  680. add_definitions(-DASSIMP_BUILD_NO_C4D_IMPORTER)
  681. ENDIF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
  682. set (TARGET_NAME Assimp)
  683. list (APPEND TARGET_PROPERTIES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH YES) # Since we only build AssetImporter as a single-arch native tool, there is no point to build Assimp as universal binary library
  684. # ATOMIC BEGIN
  685. set (INCLUDE_DIRS include)
  686. # ATOMIC END
  687. setup_library ()