-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
58 lines (49 loc) · 1.82 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
cmake_minimum_required (VERSION 2.6)
project (FimbulwinterClient)
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")
include (cotire)
include (fhelpers)
# Set a default build type if none was specified
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message (STATUS "Setting build type to 'Debug' as none was specified.")
set (CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
set_property (CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")
endif ()
if (MSVC)
add_definitions (-D_SCL_SECURE_NO_WARNINGS)
add_definitions (-D_CRT_SECURE_NO_DEPRECATE)
add_definitions (-D_CRT_NONSTDC_NO_DEPRECATE)
add_definitions (-DWIN32_LEAN_AND_MEAN)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4103")
elseif (CMAKE_COMPILER_IS_GNUCC)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++0x")
endif ()
# Is this a debug build?
if (CMAKE_BUILD_TYPE EQUAL Debug)
add_definitions (-D_DEBUG)
endif ()
# Defines
set (SOIL_WITHOUT_STBI ON)
set (SOIL_BUILTIN_BUILD ON)
set (Boost_USE_MULTITHREADED ON)
set (Boost_USE_STATIC_LIBS ON CACHE STRING "Use boost as static library")
set (SFML_STATIC_LIBRARIES TRUE CACHE STRING "Use SFML as a static library")
# Definitions
add_definitions (-DGLM_SWIZZLE)
# Packages
find_package (Boost 1.41.0 COMPONENTS system REQUIRED)
find_package (GLM REQUIRED)
find_package (SFML 2 COMPONENTS system window graphics REQUIRED)
find_package (GLEW REQUIRED)
find_package (Awesomium REQUIRED)
# Includes
include_directories (${Boost_INCLUDE_DIRS})
include_directories (${GLM_INCLUDE_DIR})
include_directories (${SFML_INCLUDE_DIR})
include_directories (${GLEW_INCLUDE_PATH})
include_directories (${AWESOMIUM_INCLUDE_DIR})
include_directories (3rdparty/SOIL/src)
include_directories (src/ya3de)
include_directories (src/libragnarok)
add_subdirectory (3rdparty/SOIL)
add_subdirectory (src)