-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
58 lines (50 loc) · 1.35 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
project(chopter)
cmake_minimum_required(VERSION 2.8)
# The version number.
set(CHOPTER_VERSION_MAJOR 0)
set(CHOPTER_VERSION_MINOR 3)
set(CHOPTER_VERSION_MICRO 0)
set(CHOPTER_VERSION "${CHOPTER_VERSION_MAJOR}.${CHOPTER_VERSION_MINOR}.${CHOPTER_VERSION_MICRO}")
# Check for windows platform
if(WIN32)
if(NOT WINDOWS)
set(WINDOWS TRUE)
endif()
endif()
configure_file(
"${PROJECT_SOURCE_DIR}/Config.h.in"
"${PROJECT_BINARY_DIR}/Config.h"
)
include_directories("${PROJECT_BINARY_DIR}")
# Use standart c++11
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
# Do not display console on window
if(WINDOWS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mwindows")
link_libraries(SDL2main)
endif()
# SDL2 and SDL2pp dependencies
include(FindSDL2PP.cmake)
include_directories(${SDL2PP_INCLUDE_DIRS})
link_libraries(SDL2pp SDL2 SDL2_ttf)
# Add build target
add_executable(chopter
src/control/Controller.cpp
src/control/Environment.cpp
src/control/Event.cpp
src/control/Logic.cpp
src/control/controllers/GameController.cpp
src/control/controllers/GameController_Draw.cpp
src/control/controllers/MainController.cpp
src/control/score.cpp
src/core/Chopter.cpp
src/core/Game.cpp
src/core/Map.cpp
src/core/utils.cpp
src/visual/Button.cpp
src/visual/Label.cpp
src/visual/Text.cpp
src/visual/TextButton.cpp
src/visual/utils.cpp
src/main.cpp
)