-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
65 lines (55 loc) · 1.88 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
cmake_minimum_required(VERSION 3.24)
project(platformer)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin)
add_executable(${PROJECT_NAME}
main.cpp
objects/Object.cpp
objects/Object.h
objects/components/Component.cpp
objects/components/Component.h
objects/components/RigidBody.cpp
objects/components/RigidBody.h
objects/components/Player.cpp
objects/components/Player.h
objects/components/Transform.cpp
objects/components/Transform.h
objects/components/SpriteRenderer.cpp
objects/components/SpriteRenderer.h
objects/ObjectManager.cpp
objects/ObjectManager.h
math/Vec2.h
math/Vec3.h
objects/components/collisions/Collider.cpp
objects/components/collisions/Collider.h
objects/components/collisions/MeshCollider.cpp
objects/components/collisions/MeshCollider.h
objects/components/collisions/Simplex.cpp
objects/components/collisions/Simplex.h
objects/components/Components.h
)
if (MSVC)
target_compile_options(${PROJECT_NAME} PRIVATE /W4)
else()
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Werror -pedantic)
endif()
include(FetchContent)
set(SFML_BUILD_AUDIO FALSE)
set(SFML_BUILD_NETWORK FALSE)
FetchContent_Declare(
sfml
GIT_REPOSITORY https://github.com/SFML/SFML.git
GIT_TAG 2.6.1
)
FetchContent_MakeAvailable(sfml)
target_link_libraries(${PROJECT_NAME} PRIVATE
sfml-graphics
)