Open Source Tomb Raider Engine
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

CMakeLists.txt 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. cmake_minimum_required (VERSION 2.8)
  2. project (OpenRaider)
  3. # Version Number
  4. set (OpenRaider_VERSION_MAJOR 0)
  5. set (OpenRaider_VERSION_MINOR 1)
  6. set (OpenRaider_VERSION_MICRO 2)
  7. # Build Host
  8. set (OpenRaider_BUILD_HOST ${CMAKE_HOST_SYSTEM})
  9. # Configuration Header file
  10. configure_file (
  11. "${PROJECT_SOURCE_DIR}/include/Config.h.in"
  12. "${PROJECT_BINARY_DIR}/Config.h"
  13. )
  14. include_directories ("${PROJECT_BINARY_DIR}")
  15. # Preprocessor Flags
  16. set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
  17. # Source Files, Executable
  18. add_executable (OpenRaider
  19. src/Camera.cpp
  20. src/Emitter.cpp
  21. src/GLString.cpp
  22. src/MatMath.cpp
  23. src/Matrix.cpp
  24. src/Mesh.cpp
  25. src/Network.cpp
  26. src/OpenRaider.cpp
  27. src/Particle.cpp
  28. src/Quaternion.cpp
  29. src/Render.cpp
  30. src/SDLSystem.cpp
  31. src/SkeletalModel.cpp
  32. src/Sound.cpp
  33. src/System.cpp
  34. src/Texture.cpp
  35. src/TombRaider.cpp
  36. src/Vector3d.cpp
  37. src/ViewVolume.cpp
  38. src/World.cpp
  39. src/tga.cpp
  40. )
  41. # Definitions for Debug build
  42. set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG -DEXPERIMENTAL")
  43. # Definitions for all builds
  44. set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSING_EMITTER")
  45. # Include Directory
  46. include_directories ("${PROJECT_SOURCE_DIR}/include")
  47. # Include External Modules
  48. set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
  49. # Add SDL2 Library
  50. find_package (SDL2 REQUIRED)
  51. include_directories (${SDL2_INCLUDE_DIR})
  52. set (LIBS ${LIBS} ${SDL2_LIBRARY})
  53. # Add SDL2_ttf Library
  54. find_package (SDL2TTF REQUIRED)
  55. include_directories (${SDL2TTF_INCLUDE_DIR})
  56. set (LIBS ${LIBS} ${SDL2TTF_LIBRARY})
  57. # Add OpenGL Library
  58. find_package (OpenGL REQUIRED)
  59. include_directories (${OPENGL_INCLUDE_DIRS})
  60. set (LIBS ${LIBS} ${OPENGL_LIBRARIES})
  61. # Add OpenAL Library
  62. find_package (OpenAL REQUIRED)
  63. include_directories (${OPENAL_INCLUDE_DIRS})
  64. set (LIBS ${LIBS} ${OPENAL_LIBRARIES})
  65. # Add ALUT Library
  66. find_package (ALUT REQUIRED)
  67. include_directories (${ALUT_INCLUDE_DIRS})
  68. set (LIBS ${LIBS} ${ALUT_LIBRARIES})
  69. # Add Z Library
  70. find_package (ZLIB REQUIRED)
  71. include_directories (${ZLIB_INCLUDE_DIRS})
  72. set (LIBS ${LIBS} ${ZLIB_LIBRARIES})
  73. # Link to all found libs
  74. target_link_libraries (OpenRaider ${LIBS})
  75. # Add the install targets
  76. install (TARGETS OpenRaider DESTINATION bin)