-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
71 lines (56 loc) · 1.93 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
66
67
68
69
70
71
project(Coblock)
cmake_minimum_required(VERSION 2.0)
set(BONES_SRC_FILES ${BONES_SRC_FILES}
"${PROJECT_SOURCE_DIR}/src/Bones/Game.cpp"
"${PROJECT_SOURCE_DIR}/src/Bones/Signal.cpp"
"${PROJECT_SOURCE_DIR}/src/Bones/ResourceManager.cpp"
"${PROJECT_SOURCE_DIR}/src/Bones/Entity.cpp"
"${PROJECT_SOURCE_DIR}/src/Bones/SpriteEntity.cpp"
"${PROJECT_SOURCE_DIR}/src/Bones/Vector2.cpp"
"${PROJECT_SOURCE_DIR}/include/Bones/Game.h"
"${PROJECT_SOURCE_DIR}/include/Bones/Signal.h"
"${PROJECT_SOURCE_DIR}/include/Bones/ResourceManager.h"
"${PROJECT_SOURCE_DIR}/include/Bones/Entity.h"
"${PROJECT_SOURCE_DIR}/include/Bones/SpriteEntity.h"
"${PROJECT_SOURCE_DIR}/include/Bones/Vector2.h"
)
SOURCE_GROUP(Bones FILES ${BONES_SRC_FILES})
set(SRC_FILES ${SRC_FILES}
"${PROJECT_SOURCE_DIR}/src/main.cpp"
"${PROJECT_SOURCE_DIR}/src/Coblock.cpp"
#"${PROJECT_SOURCE_DIR}/src/Bones/Block.cpp"
"${PROJECT_SOURCE_DIR}/include/Coblock.h"
#"${PROJECT_SOURCE_DIR}/include/Bones/Block.h"
${BONES_SRC_FILES}
)
set(INCLUDE ${INCLUDE} "${PROJECT_SOURCE_DIR}/include")
# Modules
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules")
# Boost
set(BOOST_COMPONENTS ${BOOST_COMPONENTS}
signals
)
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
set(LIBS ${LIBS} ${Boost_LIBRARIES})
include_directories(${Boost_INCLUDE_DIRS})
# SFML
find_package(SFML REQUIRED COMPONENTS System Graphics)
set(LIBS ${LIBS} ${SFML_LIBRARY})
set(INCLUDE ${INCLUDE} ${SFML_INCLUDE_DIR})
# SndFile
find_package(SndFile REQUIRED)
set(LIBS ${LIBS} ${SNDFILE_LIBRARY})
set(INCLUDE ${INCLUDE} ${INCLUDE_DIRECTORIES})
# Chipmunk
find_package(Chipmunk REQUIRED)
set(LIBS ${LIBS} ${CHIPMUNK_LIBRARY})
set(INCLUDE ${INCLUDE} ${CHIPMUNK_INCLUDE_DIR})
include_directories(${INCLUDE})
if(APPLE)
set(TARGETS ${TARGETS} MACOSX_BUNDLE)
endif(APPLE)
add_executable(Coblock
${TARGETS}
${SRC_FILES}
)
target_link_libraries(Coblock ${LIBS})