-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
50 lines (42 loc) · 1014 Bytes
/
CMakeLists.txt
File metadata and controls
50 lines (42 loc) · 1014 Bytes
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
cmake_minimum_required(VERSION 3.16)
project(cpp-monkey-platformer LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(EXECUTABLE_NAME monkey_game)
set(HEADERS
World.h
TMatrix.h
Sprite.h
Rope.h
Point.h
Player.h
IRotateable.h
IPositionable.h
IDrawable.h
DummyDrawable.h
ContactListener.h
Block.h
Bridge.h)
set(SOURCES
main.cpp
World.cpp
TMatrix.cpp
Sprite.cpp
Rope.cpp
Point.cpp
Player.cpp
DummyDrawable.cpp
ContactListener.cpp
Block.cpp
Bridge.cpp)
add_executable(${EXECUTABLE_NAME} ${HEADERS} ${SOURCES})
# SFML 2.6 (config mode)
find_package(SFML 2.6 COMPONENTS system window graphics network audio REQUIRED)
target_link_libraries(${EXECUTABLE_NAME} PRIVATE sfml-system sfml-window sfml-graphics sfml-network sfml-audio)
# Box2D 2.4 (config mode)
find_package(box2d REQUIRED)
target_link_libraries(${EXECUTABLE_NAME} PRIVATE box2d::box2d)
# Tests
enable_testing()
add_subdirectory(tests)