-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
49 lines (34 loc) · 942 Bytes
/
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
cmake_minimum_required(VERSION 3.1)
set(This game)
project(${This})
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
#set(SFML_STATIC_LIBRARIES TRUE)
# Find SFML
# Note: SFML_STATIC_LIBRARIES determines which libraries are found by find_package()
find_package(SFML 2 COMPONENTS audio graphics window system network)
set(CoreSources
main.cpp
Game.cpp
Window.cpp
)
set(PlatformerGameSources
PlatformerGame.cpp
Player.cpp
World.cpp
AnimationHolder.cpp
)
set(CommonLibs
Threads::Threads
sfml-graphics
sfml-window
sfml-system
)
#add_executable(${This} ${CoreSources} ${PlatformerGameSources})
add_executable(platformer ${CoreSources} ${PlatformerGameSources})
#target_link_libraries(${This} PUBLIC ${CommonLibs})
target_link_libraries(platformer PUBLIC ${CommonLibs})