-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
62 lines (52 loc) · 1.99 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
cmake_minimum_required(VERSION 2.8)
project(BubblesCrush)
set(BubblesInvaders_VERSION_MAJOR 0)
set(BubblesInvaders_VERSION_MINOR 1)
option(DEBUG_MODE "Debug or Release?" OFF)
if(DEBUG_MODE)
add_definitions(-DDEBUG_MODE)
set(CMAKE_BUILD_TYPE Debug)
else(DEBUG_MODE)
set(CMAKE_BUILD_TYPE Release)
endif(DEBUG_MODE)
include_directories(
SFML/include
)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/application/libs
CACHE PATH
"Single Directory for all Libraries"
)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/application
CACHE PATH
"Single Directory for all Executables."
)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/application/libs
CACHE PATH
"Single Directory for all static libraries."
)
#link_directories(
# ${CMAKE_BINARY_DIR}/bin
#)
if(MINGW)
set(FREETYPE_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/SFML/extlibs/headers/libfreetype/windows)
set(OPENAL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/SFML/extlibs/headers/AL)
set(SNDFILE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/SFML/extlibs/headers/libsndfile/windows)
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
# set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS} -static-libgcc -s")
# set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS} -static-libgcc -static-libstdc++ -s")
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++ -s")
endif()
# if(NOT MSVC)
# add_definitions(-std=c++11)
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
# set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g -Wall -DDEBUG")
# set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -g -Wall -DDEBUG")
# set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -std=c99 -O3 -DNDEBUG")
# set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG")
# endif()
add_subdirectory(bubbles-crush)
add_subdirectory(SFML)