CMakeLists.txt 954 B

1234567891011121314151617181920212223242526272829303132333435
  1. cmake_minimum_required(VERSION 3.7)
  2. project(TinyShooter)
  3. set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
  4. find_package(SDL2)
  5. find_package(SDL2_image)
  6. find_package(Box2D)
  7. include_directories(${SDL2_INCLUDE_DIR} ${SDL2_IMAGE_INCLUDE_DIR} ${BOX2D_INCLUDE_DIR})
  8. set(CMAKE_CXX_STANDARD 11)
  9. set(SOURCE_FILES
  10. main.cpp
  11. GameCore.cpp
  12. Control/Input.cpp
  13. Control/InputAndJoy.cpp
  14. Control/MouseCtrl.cpp
  15. Control/JoyPadCtrl.cpp
  16. Control/Controller.cpp
  17. Graphics/Renderer.cpp
  18. Graphics/Visual.cpp
  19. Physics/TinyWorld.cpp
  20. Physics/Entity.cpp
  21. Physics/Wall.cpp
  22. Physics/Bullet.cpp
  23. Physics/Soldier.cpp
  24. Physics/HumanSoldier.cpp
  25. Physics/AISoldier.cpp
  26. Physics/b2Angle.cpp
  27. Physics/ScullingQuery.cpp)
  28. add_executable(TinyShooter ${SOURCE_FILES})
  29. target_link_libraries(TinyShooter ${SDL2_LIBRARY} ${SDL2_IMAGE_LIBRARY} ${BOX2D_LIBRARY})