103 lines
2.7 KiB
CMake
Executable File
103 lines
2.7 KiB
CMake
Executable File
cmake_minimum_required(VERSION 3.17)
|
|
project(shooter)
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
include_directories(engine)
|
|
|
|
add_executable(shooter
|
|
# game:
|
|
main.cpp
|
|
Player.cpp
|
|
Player.h
|
|
Client.cpp
|
|
Client.h
|
|
Server.cpp
|
|
Server.h
|
|
weapon/Weapon.cpp
|
|
weapon/Weapon.h
|
|
weapon/Ak47.cpp
|
|
weapon/Ak47.h
|
|
weapon/Shotgun.cpp
|
|
weapon/Shotgun.h
|
|
weapon/Gun.cpp
|
|
weapon/Gun.h
|
|
Bonus.cpp
|
|
Bonus.h
|
|
weapon/Gold_Ak47.h
|
|
weapon/Rifle.cpp
|
|
weapon/Rifle.h
|
|
# 3d engine:
|
|
engine/utils/Time.h
|
|
engine/utils/Time.cpp
|
|
engine/utils/Point4D.h
|
|
engine/utils/Point4D.cpp
|
|
engine/utils/Matrix4x4.h
|
|
engine/utils/Matrix4x4.cpp
|
|
engine/Triangle.h
|
|
engine/Triangle.cpp
|
|
engine/Mesh.h
|
|
engine/Mesh.cpp
|
|
engine/utils/Log.h
|
|
engine/utils/Log.cpp
|
|
engine/ResourceManager.h
|
|
engine/ResourceManager.cpp
|
|
engine/World.h
|
|
engine/World.cpp
|
|
engine/Camera.h
|
|
engine/Camera.cpp
|
|
engine/Screen.h
|
|
engine/Screen.cpp
|
|
engine/Engine.h
|
|
engine/Engine.cpp
|
|
engine/Plane.h
|
|
engine/Plane.cpp
|
|
engine/animation/Animatable.h
|
|
engine/animation/Animation.h
|
|
engine/animation/Interpolation.h
|
|
engine/animation/Animatable.cpp
|
|
engine/animation/Animation.cpp
|
|
engine/animation/ATranslate.h
|
|
engine/animation/AScale.h
|
|
engine/animation/ARotate.h
|
|
engine/animation/AWait.h
|
|
engine/physics/RigidBody.cpp
|
|
engine/physics/RigidBody.h
|
|
engine/physics/Simplex.h
|
|
engine/physics/Solver.cpp
|
|
engine/physics/Solver.h
|
|
engine/Object.h
|
|
engine/gui/Button.cpp
|
|
engine/gui/Button.h
|
|
engine/gui/Window.cpp
|
|
engine/gui/Window.h
|
|
engine/network/ClientUDP.cpp
|
|
engine/network/ClientUDP.h
|
|
engine/network/MsgType.cpp
|
|
engine/network/MsgType.h
|
|
engine/network/ReliableMsg.cpp
|
|
engine/network/ReliableMsg.h
|
|
engine/network/ServerUDP.cpp
|
|
engine/network/ServerUDP.h
|
|
engine/network/UDPConnection.cpp
|
|
engine/network/UDPConnection.h
|
|
engine/network/UDPSocket.cpp
|
|
engine/network/UDPSocket.h
|
|
engine/network/config.h
|
|
engine/animation/AFunction.h
|
|
)
|
|
|
|
if(APPLE OR UNIX)
|
|
include_directories(/usr/local/include)
|
|
else()
|
|
set(SFML_DIR "C:/Libraries/SFML/lib/cmake/SFML")
|
|
set(SFML_STATIC_LIBRARIES TRUE)
|
|
endif()
|
|
|
|
find_package(SFML 2.5.1 COMPONENTS graphics audio REQUIRED)
|
|
|
|
if (SFML_FOUND)
|
|
include_directories(${SFML_INCLUDE_DIR})
|
|
endif()
|
|
|
|
target_link_libraries(shooter sfml-audio sfml-network sfml-graphics sfml-window sfml-system) |