-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
75 lines (64 loc) · 2.07 KB
/
CMakeLists.txt
File metadata and controls
75 lines (64 loc) · 2.07 KB
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
66
67
68
69
70
71
72
73
74
#Change this if you need to target a specific CMake version
cmake_minimum_required(VERSION 2.6)
project(Project-Sacrifice)
# Enable debug symbols by default
#if(CMAKE_BUILD_TYPE STREQUAL "")
# set(CMAKE_BUILD_TYPE Debug)
#endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # -DSFML_STATIC")
# (you can also set it on the command line: -D CMAKE_BUILD_TYPE=Release)
# Define sources and executable
set(EXECUTABLE_NAME "Project_Sacrifice")
set(SOURCE_FILES
source/main.cpp
source/Entity.h
source/World.cpp
source/World.h
source/TexturePool.cpp
source/TexturePool.h
source/EntityManager.cpp
source/EntityManager.h
source/PhysicsEntity.cpp
source/PhysicsEntity.h
source/Background.cpp
source/Background.h
source/Ragdoll.cpp
source/Ragdoll.h
source/Animal.cpp
source/Animal.h
source/Priest.cpp
source/Priest.h
source/ParticleEmitter.cpp
source/ParticleEmitter.h
source/BloodParticle.cpp
source/BloodParticle.h
source/SoundPool.cpp
source/SoundPool.h
source/Keys.cpp
source/Keys.h
source/Slave.cpp
source/Slave.h
source/EndFelsen.cpp
source/EndFelsen.h)
add_executable(Project_Sacrifice ${SOURCE_FILES})
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
# Detect and add SFML
#Find any version 2.X of SFML
#See the FindSFML.cmake file for additional details and instructions
#set(SFML_STATIC_LIBRARIES TRUE)
find_package(SFML 2 REQUIRED system window graphics audio)
if(SFML_FOUND)
include_directories(${SFML_INCLUDE_DIR})
target_link_libraries(${EXECUTABLE_NAME} ${SFML_LIBRARIES})
endif()
# Detect and add BOX2D
find_package(Box2D REQUIRED)
if(BOX2D_FOUND)
include_directories(${BOX2D_INCLUDE_DIR})
target_link_libraries(${EXECUTABLE_NAME} ${BOX2D_LIBRARIES})
endif()
if(APPLE)
SET(CMAKE_EXE_LINKER_FLAGS "-framework Foundation -w")
endif()
# Install target
install(TARGETS ${EXECUTABLE_NAME} DESTINATION bin)