-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
56 lines (45 loc) · 1.07 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
cmake_minimum_required(VERSION 2.6)
project(cpp-monkey-platformer)
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)
# Detect and add SFML
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake_modules")
#Find any version 2.X of SFML
#See the FindSFML.cmake file for additional details and instructions
message(${CMAKE_MODULE_PATH})
add_executable(${EXECUTABLE_NAME} ${HEADERS} ${SOURCES})
find_package(SFML REQUIRED system window graphics network audio)
if(SFML_FOUND)
include_directories(${SFML_INCLUDE_DIR})
target_link_libraries(${EXECUTABLE_NAME} ${SFML_LIBRARIES})
endif()
find_package(BOX2D REQUIRED)
if(SFML_FOUND)
include_directories(${BOX2D_INCLUDE_DIR})
target_link_libraries(${EXECUTABLE_NAME} ${BOX2D_LIBRARIES})
endif()