cmake_minimum_required(VERSION 3.7) project(TinyShooter) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules") find_package(SDL2) find_package(SDL2_image) find_package(Box2D) include_directories(${SDL2_INCLUDE_DIR} ${SDL2_IMAGE_INCLUDE_DIR} ${BOX2D_INCLUDE_DIR}) set(CMAKE_CXX_STANDARD 11) set(SOURCE_FILES main.cpp GameCore.cpp Control/Input.cpp Control/InputAndJoy.cpp Control/MouseCtrl.cpp Control/JoyPadCtrl.cpp Control/Controller.cpp Graphics/Renderer.cpp Graphics/Visual.cpp Physics/TinyWorld.cpp Physics/Entity.cpp Physics/Wall.cpp Physics/Bullet.cpp Physics/Soldier.cpp Physics/HumanSoldier.cpp Physics/AISoldier.cpp Physics/b2Angle.cpp Physics/ScullingQuery.cpp) add_executable(TinyShooter ${SOURCE_FILES}) target_link_libraries(TinyShooter ${SDL2_LIBRARY} ${SDL2_IMAGE_LIBRARY} ${BOX2D_LIBRARY})