CMakeLists.txt 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. # CMakeLists.txt for Irrlicht in STK-Editor
  2. include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include/"
  3. "${CMAKE_CURRENT_SOURCE_DIR}/source/Irrlicht/jpeglib"
  4. "${CMAKE_CURRENT_SOURCE_DIR}/source/Irrlicht/libpng"
  5. "${ZLIB_INCLUDE_DIR}"
  6. "${CMAKE_CURRENT_BINARY_DIR}/../zlib/")
  7. if(APPLE)
  8. include_directories("${CMAKE_CURRENT_SOURCE_DIR}/source/Irrlicht/MacOSX" "${CMAKE_CURRENT_SOURCE_DIR}/source/Irrlicht")
  9. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch i386")
  10. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch i386 -F/Library/Frameworks")
  11. endif()
  12. add_definitions(-DNDEBUG=1 -DIRRLICHT_EXPORTS=1 -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES)
  13. if(WIN32)
  14. add_definitions(-D_IRR_STATIC_LIB_)
  15. add_definitions(-D_CRT_SECURE_NO_WARNINGS) # Shut up about unsafe stuff
  16. else()
  17. set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing -fexpensive-optimizations -I/usr/X11R6/include")
  18. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing -fexpensive-optimizations -I/usr/X11R6/include")
  19. endif()
  20. add_definitions(-DNO_IRR_COMPILE_WITH_ZIP_ENCRYPTION_ -DNO_IRR_COMPILE_WITH_BZIP2_ -DNO_IRR_USE_NON_SYSTEM_BZLIB_ -DNO_IRR_COMPILE_WITH_LZMA_ -DNO_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ -DNO_IRR_COMPILE_WITH_DIRECT3D_9_)
  21. set(IRRLICHT_SOURCES
  22. source/Irrlicht/C3DSMeshFileLoader.cpp
  23. source/Irrlicht/CAnimatedMeshHalfLife.cpp
  24. source/Irrlicht/CAnimatedMeshMD2.cpp
  25. source/Irrlicht/CAnimatedMeshMD3.cpp
  26. source/Irrlicht/CAnimatedMeshSceneNode.cpp
  27. source/Irrlicht/CAttributes.cpp
  28. source/Irrlicht/CB3DMeshFileLoader.cpp
  29. source/Irrlicht/CBillboardSceneNode.cpp
  30. source/Irrlicht/CBoneSceneNode.cpp
  31. source/Irrlicht/CBSPMeshFileLoader.cpp
  32. source/Irrlicht/CBurningShader_Raster_Reference.cpp
  33. source/Irrlicht/CCameraSceneNode.cpp
  34. source/Irrlicht/CCgMaterialRenderer.cpp
  35. source/Irrlicht/CColladaFileLoader.cpp
  36. source/Irrlicht/CColladaMeshWriter.cpp
  37. source/Irrlicht/CColorConverter.cpp
  38. source/Irrlicht/CCSMLoader.cpp
  39. source/Irrlicht/CCubeSceneNode.cpp
  40. source/Irrlicht/CD3D8Driver.cpp
  41. source/Irrlicht/CD3D8NormalMapRenderer.cpp
  42. source/Irrlicht/CD3D8ParallaxMapRenderer.cpp
  43. source/Irrlicht/CD3D8ShaderMaterialRenderer.cpp
  44. source/Irrlicht/CD3D8Texture.cpp
  45. source/Irrlicht/CD3D9CgMaterialRenderer.cpp
  46. source/Irrlicht/CD3D9Driver.cpp
  47. source/Irrlicht/CD3D9HLSLMaterialRenderer.cpp
  48. source/Irrlicht/CD3D9NormalMapRenderer.cpp
  49. source/Irrlicht/CD3D9ParallaxMapRenderer.cpp
  50. source/Irrlicht/CD3D9ShaderMaterialRenderer.cpp
  51. source/Irrlicht/CD3D9Texture.cpp
  52. source/Irrlicht/CDefaultGUIElementFactory.cpp
  53. source/Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp
  54. source/Irrlicht/CDefaultSceneNodeFactory.cpp
  55. source/Irrlicht/CDepthBuffer.cpp
  56. source/Irrlicht/CDMFLoader.cpp
  57. source/Irrlicht/CDummyTransformationSceneNode.cpp
  58. source/Irrlicht/CEmptySceneNode.cpp
  59. source/Irrlicht/CFileList.cpp
  60. source/Irrlicht/CFileSystem.cpp
  61. source/Irrlicht/CFPSCounter.cpp
  62. source/Irrlicht/CGeometryCreator.cpp
  63. source/Irrlicht/CGUIButton.cpp
  64. source/Irrlicht/CGUICheckBox.cpp
  65. source/Irrlicht/CGUIColorSelectDialog.cpp
  66. source/Irrlicht/CGUIComboBox.cpp
  67. source/Irrlicht/CGUIContextMenu.cpp
  68. source/Irrlicht/CGUIEditBox.cpp
  69. source/Irrlicht/CGUIEnvironment.cpp
  70. source/Irrlicht/CGUIFileOpenDialog.cpp
  71. source/Irrlicht/CGUIFont.cpp
  72. source/Irrlicht/CGUIImage.cpp
  73. source/Irrlicht/CGUIImageList.cpp
  74. source/Irrlicht/CGUIInOutFader.cpp
  75. source/Irrlicht/CGUIListBox.cpp
  76. source/Irrlicht/CGUIMenu.cpp
  77. source/Irrlicht/CGUIMeshViewer.cpp
  78. source/Irrlicht/CGUIMessageBox.cpp
  79. source/Irrlicht/CGUIModalScreen.cpp
  80. source/Irrlicht/CGUIScrollBar.cpp
  81. source/Irrlicht/CGUISkin.cpp
  82. source/Irrlicht/CGUISpinBox.cpp
  83. source/Irrlicht/CGUISpriteBank.cpp
  84. source/Irrlicht/CGUIStaticText.cpp
  85. source/Irrlicht/CGUITabControl.cpp
  86. source/Irrlicht/CGUITable.cpp
  87. source/Irrlicht/CGUIToolBar.cpp
  88. source/Irrlicht/CGUITreeView.cpp
  89. source/Irrlicht/CGUIWindow.cpp
  90. source/Irrlicht/CImage.cpp
  91. source/Irrlicht/CImageLoaderBMP.cpp
  92. source/Irrlicht/CImageLoaderDDS.cpp
  93. source/Irrlicht/CImageLoaderJPG.cpp
  94. source/Irrlicht/CImageLoaderPCX.cpp
  95. source/Irrlicht/CImageLoaderPNG.cpp
  96. source/Irrlicht/CImageLoaderPPM.cpp
  97. source/Irrlicht/CImageLoaderPSD.cpp
  98. source/Irrlicht/CImageLoaderRGB.cpp
  99. source/Irrlicht/CImageLoaderTGA.cpp
  100. source/Irrlicht/CImageLoaderWAL.cpp
  101. source/Irrlicht/CImageWriterBMP.cpp
  102. source/Irrlicht/CImageWriterJPG.cpp
  103. source/Irrlicht/CImageWriterPCX.cpp
  104. source/Irrlicht/CImageWriterPNG.cpp
  105. source/Irrlicht/CImageWriterPPM.cpp
  106. source/Irrlicht/CImageWriterPSD.cpp
  107. source/Irrlicht/CImageWriterTGA.cpp
  108. source/Irrlicht/CIrrDeviceConsole.cpp
  109. source/Irrlicht/CIrrDeviceFB.cpp
  110. source/Irrlicht/CIrrDeviceLinux.cpp
  111. source/Irrlicht/CIrrDeviceSDL.cpp
  112. source/Irrlicht/CIrrDeviceStub.cpp
  113. source/Irrlicht/CIrrDeviceWin32.cpp
  114. source/Irrlicht/CIrrDeviceWinCE.cpp
  115. source/Irrlicht/CIrrMeshFileLoader.cpp
  116. source/Irrlicht/CIrrMeshWriter.cpp
  117. source/Irrlicht/CLightSceneNode.cpp
  118. source/Irrlicht/CLimitReadFile.cpp
  119. source/Irrlicht/CLMTSMeshFileLoader.cpp
  120. source/Irrlicht/CLogger.cpp
  121. source/Irrlicht/CLWOMeshFileLoader.cpp
  122. source/Irrlicht/CMD2MeshFileLoader.cpp
  123. source/Irrlicht/CMD3MeshFileLoader.cpp
  124. source/Irrlicht/CMemoryFile.cpp
  125. source/Irrlicht/CMeshCache.cpp
  126. source/Irrlicht/CMeshManipulator.cpp
  127. source/Irrlicht/CMeshSceneNode.cpp
  128. source/Irrlicht/CMetaTriangleSelector.cpp
  129. source/Irrlicht/CMountPointReader.cpp
  130. source/Irrlicht/CMS3DMeshFileLoader.cpp
  131. source/Irrlicht/CMY3DMeshFileLoader.cpp
  132. source/Irrlicht/CNPKReader.cpp
  133. source/Irrlicht/CNullDriver.cpp
  134. source/Irrlicht/COBJMeshFileLoader.cpp
  135. source/Irrlicht/COBJMeshWriter.cpp
  136. source/Irrlicht/COCTLoader.cpp
  137. source/Irrlicht/COctreeSceneNode.cpp
  138. source/Irrlicht/COctreeTriangleSelector.cpp
  139. source/Irrlicht/COgreMeshFileLoader.cpp
  140. source/Irrlicht/COpenGLCgMaterialRenderer.cpp
  141. source/Irrlicht/COpenGLDriver.cpp
  142. source/Irrlicht/COpenGLExtensionHandler.cpp
  143. source/Irrlicht/COpenGLNormalMapRenderer.cpp
  144. source/Irrlicht/COpenGLParallaxMapRenderer.cpp
  145. source/Irrlicht/COpenGLShaderMaterialRenderer.cpp
  146. source/Irrlicht/COpenGLSLMaterialRenderer.cpp
  147. source/Irrlicht/COpenGLTexture.cpp
  148. source/Irrlicht/COSOperator.cpp
  149. source/Irrlicht/CPakReader.cpp
  150. source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp
  151. source/Irrlicht/CParticleAttractionAffector.cpp
  152. source/Irrlicht/CParticleBoxEmitter.cpp
  153. source/Irrlicht/CParticleCylinderEmitter.cpp
  154. source/Irrlicht/CParticleFadeOutAffector.cpp
  155. source/Irrlicht/CParticleGravityAffector.cpp
  156. source/Irrlicht/CParticleMeshEmitter.cpp
  157. source/Irrlicht/CParticlePointEmitter.cpp
  158. source/Irrlicht/CParticleRingEmitter.cpp
  159. source/Irrlicht/CParticleRotationAffector.cpp
  160. source/Irrlicht/CParticleScaleAffector.cpp
  161. source/Irrlicht/CParticleSphereEmitter.cpp
  162. source/Irrlicht/CParticleSystemSceneNode.cpp
  163. source/Irrlicht/CPLYMeshFileLoader.cpp
  164. source/Irrlicht/CPLYMeshWriter.cpp
  165. source/Irrlicht/CQ3LevelMesh.cpp
  166. source/Irrlicht/CQuake3ShaderSceneNode.cpp
  167. source/Irrlicht/CReadFile.cpp
  168. source/Irrlicht/CSceneCollisionManager.cpp
  169. source/Irrlicht/CSceneLoaderIrr.cpp
  170. source/Irrlicht/CSceneManager.cpp
  171. source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp
  172. source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp
  173. source/Irrlicht/CSceneNodeAnimatorCollisionResponse.cpp
  174. source/Irrlicht/CSceneNodeAnimatorDelete.cpp
  175. source/Irrlicht/CSceneNodeAnimatorFlyCircle.cpp
  176. source/Irrlicht/CSceneNodeAnimatorFlyStraight.cpp
  177. source/Irrlicht/CSceneNodeAnimatorFollowSpline.cpp
  178. source/Irrlicht/CSceneNodeAnimatorRotation.cpp
  179. source/Irrlicht/CSceneNodeAnimatorTexture.cpp
  180. source/Irrlicht/CShadowVolumeSceneNode.cpp
  181. source/Irrlicht/CSkinnedMesh.cpp
  182. source/Irrlicht/CSkyBoxSceneNode.cpp
  183. source/Irrlicht/CSkyDomeSceneNode.cpp
  184. source/Irrlicht/CSMFMeshFileLoader.cpp
  185. source/Irrlicht/CSoftwareDriver2.cpp
  186. source/Irrlicht/CSoftwareDriver.cpp
  187. source/Irrlicht/CSoftwareTexture2.cpp
  188. source/Irrlicht/CSoftwareTexture.cpp
  189. source/Irrlicht/CSphereSceneNode.cpp
  190. source/Irrlicht/CSTLMeshFileLoader.cpp
  191. source/Irrlicht/CSTLMeshWriter.cpp
  192. source/Irrlicht/CTarReader.cpp
  193. source/Irrlicht/CTerrainSceneNode.cpp
  194. source/Irrlicht/CTerrainTriangleSelector.cpp
  195. source/Irrlicht/CTextSceneNode.cpp
  196. source/Irrlicht/CTRFlat.cpp
  197. source/Irrlicht/CTRFlatWire.cpp
  198. source/Irrlicht/CTRGouraud2.cpp
  199. source/Irrlicht/CTRGouraudAlpha2.cpp
  200. source/Irrlicht/CTRGouraudAlphaNoZ2.cpp
  201. source/Irrlicht/CTRGouraud.cpp
  202. source/Irrlicht/CTRGouraudWire.cpp
  203. source/Irrlicht/CTriangleBBSelector.cpp
  204. source/Irrlicht/CTriangleSelector.cpp
  205. source/Irrlicht/CTRNormalMap.cpp
  206. source/Irrlicht/CTRStencilShadow.cpp
  207. source/Irrlicht/CTRTextureBlend.cpp
  208. source/Irrlicht/CTRTextureDetailMap2.cpp
  209. source/Irrlicht/CTRTextureFlat.cpp
  210. source/Irrlicht/CTRTextureFlatWire.cpp
  211. source/Irrlicht/CTRTextureGouraud2.cpp
  212. source/Irrlicht/CTRTextureGouraudAdd2.cpp
  213. source/Irrlicht/CTRTextureGouraudAdd.cpp
  214. source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp
  215. source/Irrlicht/CTRTextureGouraudAlpha.cpp
  216. source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp
  217. source/Irrlicht/CTRTextureGouraud.cpp
  218. source/Irrlicht/CTRTextureGouraudNoZ2.cpp
  219. source/Irrlicht/CTRTextureGouraudNoZ.cpp
  220. source/Irrlicht/CTRTextureGouraudVertexAlpha2.cpp
  221. source/Irrlicht/CTRTextureGouraudWire.cpp
  222. source/Irrlicht/CTRTextureLightMap2_Add.cpp
  223. source/Irrlicht/CTRTextureLightMap2_M1.cpp
  224. source/Irrlicht/CTRTextureLightMap2_M2.cpp
  225. source/Irrlicht/CTRTextureLightMap2_M4.cpp
  226. source/Irrlicht/CTRTextureLightMapGouraud2_M4.cpp
  227. source/Irrlicht/CTRTextureWire2.cpp
  228. source/Irrlicht/CVideoModeList.cpp
  229. source/Irrlicht/CVolumeLightSceneNode.cpp
  230. source/Irrlicht/CWADReader.cpp
  231. source/Irrlicht/CWaterSurfaceSceneNode.cpp
  232. source/Irrlicht/CWriteFile.cpp
  233. source/Irrlicht/CXMeshFileLoader.cpp
  234. source/Irrlicht/CXMLReader.cpp
  235. source/Irrlicht/CXMLWriter.cpp
  236. source/Irrlicht/CZBuffer.cpp
  237. source/Irrlicht/CZipReader.cpp
  238. source/Irrlicht/IBurningShader.cpp
  239. source/Irrlicht/Irrlicht.cpp
  240. source/Irrlicht/irrXML.cpp
  241. source/Irrlicht/os.cpp
  242. source/Irrlicht/jpeglib/jaricom.c
  243. source/Irrlicht/jpeglib/jcapimin.c
  244. source/Irrlicht/jpeglib/jcapistd.c
  245. source/Irrlicht/jpeglib/jcarith.c
  246. source/Irrlicht/jpeglib/jccoefct.c
  247. source/Irrlicht/jpeglib/jccolor.c
  248. source/Irrlicht/jpeglib/jcdctmgr.c
  249. source/Irrlicht/jpeglib/jchuff.c
  250. source/Irrlicht/jpeglib/jcinit.c
  251. source/Irrlicht/jpeglib/jcmainct.c
  252. source/Irrlicht/jpeglib/jcmarker.c
  253. source/Irrlicht/jpeglib/jcmaster.c
  254. source/Irrlicht/jpeglib/jcomapi.c
  255. source/Irrlicht/jpeglib/jcparam.c
  256. source/Irrlicht/jpeglib/jcprepct.c
  257. source/Irrlicht/jpeglib/jcsample.c
  258. source/Irrlicht/jpeglib/jctrans.c
  259. source/Irrlicht/jpeglib/jdapimin.c
  260. source/Irrlicht/jpeglib/jdapistd.c
  261. source/Irrlicht/jpeglib/jdarith.c
  262. source/Irrlicht/jpeglib/jdatadst.c
  263. source/Irrlicht/jpeglib/jdatasrc.c
  264. source/Irrlicht/jpeglib/jdcoefct.c
  265. source/Irrlicht/jpeglib/jdcolor.c
  266. source/Irrlicht/jpeglib/jddctmgr.c
  267. source/Irrlicht/jpeglib/jdhuff.c
  268. source/Irrlicht/jpeglib/jdinput.c
  269. source/Irrlicht/jpeglib/jdmainct.c
  270. source/Irrlicht/jpeglib/jdmarker.c
  271. source/Irrlicht/jpeglib/jdmaster.c
  272. source/Irrlicht/jpeglib/jdmerge.c
  273. source/Irrlicht/jpeglib/jdpostct.c
  274. source/Irrlicht/jpeglib/jdsample.c
  275. source/Irrlicht/jpeglib/jdtrans.c
  276. source/Irrlicht/jpeglib/jerror.c
  277. source/Irrlicht/jpeglib/jfdctflt.c
  278. source/Irrlicht/jpeglib/jfdctfst.c
  279. source/Irrlicht/jpeglib/jfdctint.c
  280. source/Irrlicht/jpeglib/jidctflt.c
  281. source/Irrlicht/jpeglib/jidctfst.c
  282. source/Irrlicht/jpeglib/jidctint.c
  283. source/Irrlicht/jpeglib/jmemmgr.c
  284. source/Irrlicht/jpeglib/jmemnobs.c
  285. source/Irrlicht/jpeglib/jquant1.c
  286. source/Irrlicht/jpeglib/jquant2.c
  287. source/Irrlicht/jpeglib/jutils.c
  288. source/Irrlicht/libpng/pngwutil.c
  289. source/Irrlicht/libpng/pngget.c
  290. source/Irrlicht/libpng/pngrtran.c
  291. source/Irrlicht/libpng/pngrutil.c
  292. source/Irrlicht/libpng/pngerror.c
  293. source/Irrlicht/libpng/pngset.c
  294. source/Irrlicht/libpng/pngtest.c
  295. source/Irrlicht/libpng/pngmem.c
  296. source/Irrlicht/libpng/pngpread.c
  297. source/Irrlicht/libpng/png.c
  298. source/Irrlicht/libpng/pngread.c
  299. source/Irrlicht/libpng/pngwio.c
  300. source/Irrlicht/libpng/pngtrans.c
  301. source/Irrlicht/libpng/pngwrite.c
  302. source/Irrlicht/libpng/pngwtran.c
  303. source/Irrlicht/libpng/example.c
  304. source/Irrlicht/libpng/pngrio.c
  305. )
  306. if(APPLE)
  307. set(IRRLICHT_SOURCES
  308. ${IRRLICHT_SOURCES}
  309. source/Irrlicht/MacOSX/AppDelegate.mm
  310. source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm
  311. source/Irrlicht/MacOSX/OSXClipboard.mm)
  312. #list(APPEND CMAKE_C_SOURCE_FILE_EXTENSIONS mm)
  313. #set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS cpp)
  314. set_source_files_properties(source/Irrlicht/MacOSX/AppDelegate.mm PROPERTIES COMPILE_FLAGS "-x objective-c++ -O3 -fno-rtti")
  315. set_source_files_properties(source/Irrlicht/MacOSX/AppDelegate.mm PROPERTIES LANGUAGE C)
  316. set_source_files_properties(source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm PROPERTIES COMPILE_FLAGS "-x objective-c++ -O3 -fno-rtti")
  317. set_source_files_properties(source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm PROPERTIES LANGUAGE C)
  318. set_source_files_properties(source/Irrlicht/MacOSX/OSXClipboard.mm PROPERTIES COMPILE_FLAGS "-x objective-c++ -O3 -fno-rtti")
  319. set_source_files_properties(source/Irrlicht/MacOSX/OSXClipboard.mm PROPERTIES LANGUAGE C)
  320. endif()
  321. add_library(irrlicht ${IRRLICHT_SOURCES})
  322. target_link_libraries(irrlicht ${ZLIB_LIBRARY})