PageRenderTime 17ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/CMakeLists.txt

https://bitbucket.org/cabalistic/ogredeps/
CMake | 48 lines | 37 code | 8 blank | 3 comment | 7 complexity | ed9e025bf4e0540d8752e2ba1fcdad7f MD5 | raw file
 1cmake_minimum_required(VERSION 2.8.10)
 2
 3project(OGREDEPS)
 4set(CMAKE_MODULE_PATH "${OGREDEPS_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
 5
 6if (WIN32)
 7  # Look for DirectX which is needed by OIS.
 8  find_package(DirectX)
 9  add_definitions(-DWINVER=0x0500)
10endif ()
11
12if (APPLE AND NOT ANDROID)
13  set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
14  set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
15endif()
16
17if (APPLE AND OGRE_BUILD_PLATFORM_APPLE_IOS)
18  # Set build variables
19  set(XCODE_ATTRIBUTE_SDKROOT iphoneos)
20  set(CMAKE_OSX_SYSROOT iphoneos)
21  if(XCODE_VERSION VERSION_LESS 5.0)
22    set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_32_BIT)")
23  else()
24    set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD)")
25  endif()
26  add_definitions(-DHAVE_UNISTD_H=1)
27elseif (APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
28  # 10.7 is the minimum for libc++ support
29  set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7)
30
31  if (NOT CMAKE_OSX_ARCHITECTURES)
32    set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_32_64_BIT)")
33  endif()
34endif ()
35
36if (ANDROID)
37  SET(TargetPlatform "Android")
38  SET(OGRE_PLATFORM OGRE_PLATFORM_ANDROID)
39endif()
40
41if (EMSCRIPTEN)
42  set(TargetPlatform "Emscripten")
43  set(OGRE_PLATFORM OGRE_PLATFORM_EMSCRIPTEN)
44  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-warn-absolute-paths -Werror=implicit-function-declaration")
45  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-warn-absolute-paths -Werror=implicit-function-declaration")
46endif()
47
48add_subdirectory(src)