CMakeLists.txt 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. # set up common includes
  2. INCLUDE(PolycodeIncludes)
  3. SET(polycore_SRCS
  4. Source/OSBasics.cpp
  5. Source/PolyBezierCurve.cpp
  6. Source/PolyBone.cpp
  7. Source/PolyCamera.cpp
  8. Source/PolyColor.cpp
  9. Source/PolyConfig.cpp
  10. Source/PolyCore.cpp
  11. Source/PolyCoreInput.cpp
  12. Source/PolyCoreServices.cpp
  13. Source/PolyCubemap.cpp
  14. Source/PolyData.cpp
  15. Source/PolyEntity.cpp
  16. Source/PolyEvent.cpp
  17. Source/PolyEventDispatcher.cpp
  18. Source/PolyEventHandler.cpp
  19. Source/PolyFixedShader.cpp
  20. Source/PolyFont.cpp
  21. Source/PolyFontManager.cpp
  22. Source/PolyGLCubemap.cpp
  23. Source/PolyGLRenderer.cpp
  24. Source/PolyGLSLProgram.cpp
  25. Source/PolyGLSLShader.cpp
  26. Source/PolyGLSLShaderModule.cpp
  27. Source/PolyGLTexture.cpp
  28. Source/PolyGLVertexBuffer.cpp
  29. Source/PolyImage.cpp
  30. Source/PolyInputEvent.cpp
  31. Source/PolyLabel.cpp
  32. Source/PolyLogger.cpp
  33. Source/PolyMaterial.cpp
  34. Source/PolyMaterialManager.cpp
  35. Source/PolyMatrix4.cpp
  36. Source/PolyMesh.cpp
  37. Source/PolyModule.cpp
  38. Source/PolyObject.cpp
  39. Source/PolyParticle.cpp
  40. Source/PolyParticleEmitter.cpp
  41. Source/PolyPerlin.cpp
  42. Source/PolyPolygon.cpp
  43. Source/PolyQuaternion.cpp
  44. Source/PolyQuaternionCurve.cpp
  45. Source/PolyRectangle.cpp
  46. Source/PolyRenderer.cpp
  47. Source/PolyResource.cpp
  48. Source/PolyResourceManager.cpp
  49. Source/PolyScene.cpp
  50. Source/PolySceneEntity.cpp
  51. Source/PolySceneLabel.cpp
  52. Source/PolySceneLight.cpp
  53. Source/PolySceneLine.cpp
  54. Source/PolySceneManager.cpp
  55. Source/PolySceneMesh.cpp
  56. Source/PolyScenePrimitive.cpp
  57. Source/PolySceneRenderTexture.cpp
  58. Source/PolySceneSound.cpp
  59. Source/PolyScreen.cpp
  60. Source/PolyScreenCurve.cpp
  61. Source/PolyScreenEntity.cpp
  62. Source/PolyScreenEvent.cpp
  63. Source/PolyScreenImage.cpp
  64. Source/PolyScreenLabel.cpp
  65. Source/PolyScreenLine.cpp
  66. Source/PolyScreenManager.cpp
  67. Source/PolyScreenMesh.cpp
  68. Source/PolyScreenShape.cpp
  69. Source/PolyScreenSound.cpp
  70. Source/PolyScreenSprite.cpp
  71. Source/PolyShader.cpp
  72. Source/PolySkeleton.cpp
  73. Source/PolySound.cpp
  74. Source/PolySoundManager.cpp
  75. Source/PolyString.cpp
  76. Source/PolyTexture.cpp
  77. Source/PolyTimer.cpp
  78. Source/PolyTimerManager.cpp
  79. Source/PolyTween.cpp
  80. Source/PolyTweenManager.cpp
  81. Source/PolyVector2.cpp
  82. Source/PolyVector3.cpp
  83. Source/PolyVertex.cpp
  84. Source/tinystr.cpp
  85. Source/tinyxml.cpp
  86. Source/tinyxmlerror.cpp
  87. Source/tinyxmlparser.cpp
  88. )
  89. SET(polycore_HDRS
  90. Include/OSBasics.h
  91. Include/PolyBasics.h
  92. Include/PolyBezierCurve.h
  93. Include/PolyBone.h
  94. Include/PolyCamera.h
  95. Include/Polycode.h
  96. Include/PolyColor.h
  97. Include/PolyConfig.h
  98. Include/PolyCore.h
  99. Include/PolyCoreInput.h
  100. Include/PolyCoreServices.h
  101. Include/PolyCubemap.h
  102. Include/PolyData.h
  103. Include/PolyEntity.h
  104. Include/PolyEventDispatcher.h
  105. Include/PolyEvent.h
  106. Include/PolyEventHandler.h
  107. Include/PolyFixedShader.h
  108. Include/PolyFont.h
  109. Include/PolyFontManager.h
  110. Include/PolyGLCubemap.h
  111. Include/PolyGlobals.h
  112. Include/PolyGLRenderer.h
  113. Include/PolyGLSLProgram.h
  114. Include/PolyGLSLShader.h
  115. Include/PolyGLSLShaderModule.h
  116. Include/PolyGLTexture.h
  117. Include/PolyGLVertexBuffer.h
  118. Include/PolyImage.h
  119. Include/PolyInputEvent.h
  120. Include/PolyInputKeys.h
  121. Include/PolyLabel.h
  122. Include/PolyLogger.h
  123. Include/PolyMaterial.h
  124. Include/PolyMaterialManager.h
  125. Include/PolyMatrix4.h
  126. Include/PolyMesh.h
  127. Include/PolyModule.h
  128. Include/PolyObject.h
  129. Include/PolyParticleEmitter.h
  130. Include/PolyParticle.h
  131. Include/PolyPerlin.h
  132. Include/PolyPolygon.h
  133. Include/PolyQuaternionCurve.h
  134. Include/PolyQuaternion.h
  135. Include/PolyRectangle.h
  136. Include/PolyRenderer.h
  137. Include/PolyResource.h
  138. Include/PolyResourceManager.h
  139. Include/PolySceneEntity.h
  140. Include/PolyScene.h
  141. Include/PolySceneLabel.h
  142. Include/PolySceneLight.h
  143. Include/PolySceneLine.h
  144. Include/PolySceneManager.h
  145. Include/PolySceneMesh.h
  146. Include/PolyScenePrimitive.h
  147. Include/PolySceneRenderTexture.h
  148. Include/PolySceneSound.h
  149. Include/PolyScreenCurve.h
  150. Include/PolyScreenEntity.h
  151. Include/PolyScreenEvent.h
  152. Include/PolyScreen.h
  153. Include/PolyScreenImage.h
  154. Include/PolyScreenLabel.h
  155. Include/PolyScreenLine.h
  156. Include/PolyScreenManager.h
  157. Include/PolyScreenMesh.h
  158. Include/PolyScreenShape.h
  159. Include/PolyScreenSound.h
  160. Include/PolyScreenSprite.h
  161. Include/PolyShader.h
  162. Include/PolySkeleton.h
  163. Include/PolySound.h
  164. Include/PolySoundManager.h
  165. Include/PolyString.h
  166. Include/PolyTexture.h
  167. Include/PolyThreaded.h
  168. Include/PolyTimer.h
  169. Include/PolyTimerManager.h
  170. Include/PolyTween.h
  171. Include/PolyTweenManager.h
  172. Include/PolyVector2.h
  173. Include/PolyVector3.h
  174. Include/PolyVertex.h
  175. Include/tinystr.h
  176. Include/tinyxml.h
  177. )
  178. SET(CMAKE_DEBUG_POSTFIX "_d")
  179. # TODO: iPhone
  180. # Include/PolyiPhoneCore.h
  181. # Include/Poly_iPhone.h
  182. # Source/PolyiPhoneCore.cpp
  183. # TODO: PolyGLES1
  184. # Include/PolyGLES1Renderer.h
  185. # Include/PolyGLES1Texture.h
  186. # Source/PolyGLES1Renderer.cpp
  187. # Source/PolyGLES1Texture.cpp
  188. # platform specific
  189. IF(MSVC)
  190. SET(polycore_SRCS ${polycore_SRCS} ../Build/MSVC/Polycore/PolycodeView.cpp Source/PolyWinCore.cpp)
  191. SET(polycore_HDRS ${polycore_HDRS} ../Build/MSVC/Polycore/PolycodeView.h Include/PolyWinCore.h)
  192. ELSEIF(APPLE)
  193. SET(polycore_SRCS ${polycore_SRCS} "../Build/Mac OS X/PolycodeView.mm" Source/PolyAGLCore.cpp Source/PolyCocoaCore.cpp)
  194. SET(polycore_HDRS ${polycore_HDRS} "../Build/Mac OS X/PolycodeView.h" Include/PolyAGLCore.h Include/PolyCocoaCore.h)
  195. ELSE(MSVC)
  196. SET(polycore_SRCS ${polycore_SRCS} ../Build/Linux/PolycodeView.cpp Source/PolySDLCore.cpp)
  197. SET(polycore_HDRS ${polycore_HDRS} ../Build/Linux/PolycodeView.h Include/PolySDLCore.h)
  198. ENDIF(MSVC)
  199. IF(POLYCODE_BUILD_SHARED)
  200. ADD_LIBRARY(Polycore SHARED ${polycore_SRCS} ${polycore_HDRS})
  201. TARGET_LINK_LIBRARIES(Polycore
  202. ${OPENGL_LIBRARIES}
  203. ${OPENAL_LIBRARY}
  204. ${PNG_LIBRARIES}
  205. ${FREETYPE_LIBRARIES}
  206. ${PHYSFS_LIBRARY}
  207. ${OGG_LIBRARIES}
  208. ${VORBIS_LIBRARIES}
  209. ${VORBISFILE_LIBRARIES}
  210. ${SDL_LIBRARY})
  211. ENDIF(POLYCODE_BUILD_SHARED)
  212. IF(POLYCODE_BUILD_STATIC)
  213. ADD_LIBRARY(Polycore_static ${polycore_SRCS} ${polycore_HDRS})
  214. ENDIF(POLYCODE_BUILD_STATIC)
  215. IF(POLYCODE_INSTALL_FRAMEWORK)
  216. # install headers
  217. INSTALL(FILES ${polycore_HDRS}
  218. DESTINATION ${POLYCODE_RELEASE_DIR}/Framework/Core/include)
  219. # install libraries
  220. IF(POLYCODE_BUILD_SHARED)
  221. INSTALL(TARGETS Polycore EXPORT Polycore-targets
  222. DESTINATION ${POLYCODE_RELEASE_DIR}/Framework/Core/lib)
  223. ENDIF(POLYCODE_BUILD_SHARED)
  224. IF(POLYCODE_BUILD_STATIC)
  225. INSTALL(TARGETS Polycore_static EXPORT Polycore-targets
  226. DESTINATION ${POLYCODE_RELEASE_DIR}/Framework/Core/lib)
  227. ENDIF(POLYCODE_BUILD_STATIC)
  228. ENDIF(POLYCODE_INSTALL_FRAMEWORK)
  229. IF(POLYCODE_INSTALL_PLAYER AND POLYCODE_BUILD_SHARED)
  230. # install required libs
  231. INSTALL(TARGETS Polycore DESTINATION ${POLYCODE_RELEASE_DIR}/Player)
  232. INSTALL(DIRECTORY ${POLYCODE_RELEASE_DIR}/Framework/Core/Dependencies/bin/
  233. DESTINATION ${POLYCODE_RELEASE_DIR}/Player)
  234. ENDIF()