-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
93 lines (71 loc) · 1.12 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
CMAKE_MINIMUM_REQUIRED (VERSION 2.8)
PROJECT ("SfBall")
#
# CMake Configuration
#
SET (CMAKE_CXX_FLAGS "-std=c++0x -Wall -D_USE_MATH_DEFINES")
#
# Custom CMake modules
#
SET (
CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/CMakeModules ${CMAKE_MODULE_PATH}
)
#
# Variables
#
SET (SFBALL_BUNDLE_PATH ${CMAKE_SOURCE_DIR}/bin)
#
# Dependencies
#
# Find SFML
FIND_PACKAGE (SFML 2 REQUIRED system window graphics)
#
# Include Directories
#
INCLUDE_DIRECTORIES (
${SFML_INCLUDE_DIR}
"include/"
)
#
# Sources
#
# DxBall
FILE (
GLOB_RECURSE
SFBALL_SOURCES
${CMAKE_SOURCE_DIR}/src/*
)
#
# Exec
#
# DxBall
ADD_EXECUTABLE (
SfBall
${SFBALL_SOURCES}
)
#
# Library linking
#
# DxBall
TARGET_LINK_LIBRARIES (
SfBall
${SFML_LIBRARIES}
${CMAKE_SOURCE_DIR}/lib/libBox2D.a
)
#
# Setup bundles
#
# DxBall bundle
SET_PROPERTY (
TARGET SfBall
PROPERTY RUNTIME_OUTPUT_DIRECTORY ${SFBALL_BUNDLE_PATH}
)
SET_PROPERTY (
TARGET SfBall
PROPERTY RUNTIME_OUTPUT_DIRECTORY_DEBUG ${SFBALL_BUNDLE_PATH}
)
SET_PROPERTY (
TARGET SfBall
PROPERTY RUNTIME_OUTPUT_DIRECTORY_RELEASE ${SFBALL_BUNDLE_PATH}
)