forked from zaphire/Monocle-Engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
57 lines (43 loc) · 1.31 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
project(Monocle)
cmake_minimum_required(VERSION 2.6.0)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
include(CheckIncludeFiles)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")
include_directories(AFTER SYSTEM ${PROJECT_BINARY_DIR} Code)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/Build/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/Build/lib)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(BUILD_TESTS OFF CACHE BOOL "Build tests")
set(WITH_OPENAL ON CACHE BOOL "Use OpenAL")
set(WITH_OPENGL ON CACHE BOOL "Use OpenGL")
set(WITH_AUDIOOGG ON CACHE BOOL "Use OGG Vorbis")
set(WITH_AUDIOWAVE ON CACHE BOOL "Use Wave")
if(WIN32)
add_definitions(-DMONOCLE_WINDOWS)
set(WINDOWS ON)
endif(WIN32)
if (APPLE)
add_definitions(-DMONOCLE_APPLE)
set(MACOSX ON)
set(APPLE ON)
endif(APPLE)
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
find_package(X11 REQUIRED)
add_definitions(-DMONOCLE_LINUX)
set(LINUX ON)
endif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
if(WITH_OPENGL)
find_package(OpenGL REQUIRED)
add_definitions(-DMONOCLE_OPENGL)
endif(WITH_OPENGL)
if(WITH_OPENAL)
find_package(OpenAL REQUIRED)
add_definitions(-DMONOCLE_OPENAL)
endif(WITH_OPENAL)
if(WITH_AUDIOOGG)
find_package(OggVorbis REQUIRED)
add_definitions(-DMONOCLE_AUDIO_OGG)
endif(WITH_AUDIOOGG)
add_subdirectory(Code)