Skip to content

Commit

Permalink
Updated Ogre v1-9 to latest revision. (d9ec345796c2)
Browse files Browse the repository at this point in the history
  • Loading branch information
harkon.kr@gmail.com committed Jan 6, 2014
1 parent 49857bb commit c3196a5
Show file tree
Hide file tree
Showing 1,595 changed files with 10,476 additions and 6,313 deletions.
15 changes: 9 additions & 6 deletions CMake/CMakeLists.txt
Expand Up @@ -31,15 +31,22 @@ set(INST_FILES
Utils/OgreGetVersion.cmake
Utils/OgreFindFrameworks.cmake
)

if (OGRE_CONFIG_THREAD_PROVIDER STREQUAL "poco")
set(INST_FILES ${INST_FILES} Packages/FindPOCO.cmake)
endif ()

if (OGRE_CONFIG_THREAD_PROVIDER STREQUAL "tbb")
set(INST_FILES ${INST_FILES} Packages/FindTBB.cmake)
endif ()

set(STATIC_INST_FILES
Packages/FindCg.cmake
Packages/FindDirectX.cmake
Packages/FindFreeImage.cmake
Packages/FindFreetype.cmake
Packages/FindOpenGLES.cmake
Packages/FindOpenGLES2.cmake
Packages/FindPOCO.cmake
Packages/FindTBB.cmake
Packages/FindZLIB.cmake
Packages/FindZZip.cmake
Packages/FindSoftimage.cmake
Expand All @@ -54,10 +61,6 @@ endif ()
if (APPLE)
set(INST_FILES ${INST_FILES}
Packages/FindCg.cmake
Packages/FindIOKit.cmake
Packages/FindCarbon.cmake
Packages/FindCocoa.cmake
Packages/FindCoreVideo.cmake
)
set(STATIC_INST_FILES ${STATIC_INST_FILES}
Packages/FindGLSLOptimizer.cmake
Expand Down
25 changes: 22 additions & 3 deletions CMake/ConfigOgreKit.cmake
Expand Up @@ -72,9 +72,11 @@ macro (configure_ogrekit ROOT OGREPATH OGRE_BACKEND)
endif()

option(OGREKIT_BUILD_ANDROID "Build GameKit on Android SDK" OFF)
option(OGREKIT_BUILD_NACL "Build GameKit on NACL" OFF)


if (OGREKIT_BUILD_ANDROID OR OGREKIT_BUILD_IPHONE)
set(OGREKIT_BUILD_MOBILE 1)
if (OGREKIT_BUILD_ANDROID OR OGREKIT_BUILD_IPHONE OR OGREKIT_BUILD_NACL)
set(OGREKIT_BUILD_MOBILE 1) #Force use GLES2, not GL.
endif()

if (OGREKIT_BUILD_GLES2RS)
Expand Down Expand Up @@ -286,6 +288,23 @@ macro (configure_ogrekit ROOT OGREPATH OGRE_BACKEND)

#message(${OGREKIT_BUILD_GLRS} "---" ${OGREKIT_BUILD_GLESRS} " --- " ${OPENGLES2_gl_LIBRARY})

elseif (OGREKIT_BUILD_NACL)

set(OGRE_BUILD_PLATFORM_NACL TRUE)
include_directories(${OPENGLES2_INCLUDE_DIR})
#include_directories(${OGRE_SOURCE_DIR}/RenderSystems/GLES2/include)
include_directories(${NACL_SDK_ROOT}/include)

set(OGREKIT_OPENAL_SOUND CACHE BOOL "Forcing remove OpenAL" FORCE)

set(OGREKIT_BUILD_GLRS FALSE CACHE BOOL "Forcing GLRS" FORCE)
set(OGREKIT_BUILD_GLESRS FALSE CACHE BOOL "Forcing remove GLESRS" FORCE)
set(OGREKIT_BUILD_GLES2RS TRUE CACHE BOOL "Forcing remove GLES2RS" FORCE)

set(OGREKIT_MINIMAL_FREEIMAGE_CODEC TRUE CACHE BOOL "Forcing FreeImage minimal codec" FORCE)

set(OGREKIT_USE_RTSHADER_SYSTEM TRUE CACHE BOOL "Forcing RTShaderSystem for Android" FORCE)

elseif (OGREKIT_BUILD_IPHONE)

set(OGRE_BUILD_PLATFORM_IPHONE TRUE) #TODO: replace to OGRE_BUILD_APPLE_IOS
Expand Down Expand Up @@ -425,7 +444,7 @@ macro (configure_ogrekit ROOT OGREPATH OGRE_BACKEND)

message(STATUS "DEP_INCLUDES: ${OGREKIT_DEP_INCLUDE}")

if (WIN32 AND NOT OGREKIT_BUILD_ANDROID)
if (WIN32 AND NOT (OGREKIT_BUILD_ANDROID OR OGREKIT_BUILD_NACL))
# Use static library. No SDK needed at build time.
# Must have OpenAL32.dll installed on the system
# In order to use OpenAL sound.
Expand Down
46 changes: 25 additions & 21 deletions CMake/ConfigureBuild.cmake
Expand Up @@ -9,7 +9,7 @@

#######################################################################
# This file takes care of configuring Ogre to build with the settings
# given in CMake. It creates the necessary config.h file and will
# given in CMake. It creates the necessary config.h file and will
# also prepare package files for pkg-config and CMake.
#######################################################################

Expand Down Expand Up @@ -60,32 +60,42 @@ if (OGRE_CONFIG_THREADS)
if (OGRE_CONFIG_THREAD_PROVIDER STREQUAL "tbb")
set(OGRE_THREAD_PROVIDER 3)
include_directories(${TBB_INCLUDE_DIRS})
if (WIN32 AND MINGW)
add_definitions(-D_WIN32_WINNT=0x0501)
endif ()

set(OGRE_THREAD_LIBRARIES ${TBB_LIBRARIES})
endif ()
endif()

set(OGRE_ASSERT_MODE 0 CACHE STRING
"Enable Ogre asserts and exceptions. Possible values:
0 - Standard asserts in debug builds, nothing in release builds.
1 - Standard asserts in debug builds, exceptions in release builds.
2 - Exceptions in debug builds, exceptions in release builds."
)

# determine config values depending on build options
# determine config values depending on build options
set(OGRE_ASSERT_MODE 0)
set(OGRE_SET_DOUBLE 0)
set(OGRE_SET_ALLOCATOR ${OGRE_CONFIG_ALLOCATOR})
set(OGRE_SET_CONTAINERS_USE_ALLOCATOR 0)
set(OGRE_SET_STRING_USE_ALLOCATOR 0)
set(OGRE_SET_MEMTRACK_DEBUG 0)
set(OGRE_SET_MEMTRACK_RELEASE 0)
set(OGRE_SET_ASSERT_MODE ${OGRE_ASSERT_MODE})
set(OGRE_SET_THREADS ${OGRE_CONFIG_THREADS})
set(OGRE_SET_THREAD_PROVIDER ${OGRE_THREAD_PROVIDER})
set(OGRE_SET_DISABLE_FREEIMAGE 0)
set(OGRE_SET_DISABLE_DDS 0)
set(OGRE_SET_DISABLE_PVRTC 0)
set(OGRE_SET_DISABLE_ETC1 0)
set(OGRE_SET_DISABLE_ETC 0)
set(OGRE_SET_DISABLE_ZIP 0)
set(OGRE_SET_DISABLE_LIBCPP_SUPPORT 0)
set(OGRE_SET_DISABLE_VIEWPORT_ORIENTATIONMODE 0)
set(OGRE_SET_DISABLE_GLES2_CG_SUPPORT 0)
set(OGRE_SET_DISABLE_GLES2_GLSL_OPTIMISER 0)
set(OGRE_SET_DISABLE_GLES2_VAO_SUPPORT 0)
set(OGRE_SET_DISABLE_GLES_STATE_CACHE_SUPPORT 0)
set(OGRE_SET_DISABLE_GLES2_STATE_CACHE_SUPPORT 0)
set(OGRE_SET_DISABLE_GL_STATE_CACHE_SUPPORT 0)
set(OGRE_SET_DISABLE_GLES3_SUPPORT 0)
set(RTSHADER_SYSTEM_BUILD_CORE_SHADERS 0)
set(RTSHADER_SYSTEM_BUILD_EXT_SHADERS 0)
Expand Down Expand Up @@ -116,15 +126,12 @@ endif()
if (NOT OGRE_CONFIG_ENABLE_PVRTC)
set(OGRE_SET_DISABLE_PVRTC 1)
endif()
if (NOT OGRE_CONFIG_ENABLE_ETC1)
set(OGRE_SET_DISABLE_ETC1 1)
if (NOT OGRE_CONFIG_ENABLE_ETC)
set(OGRE_SET_DISABLE_ETC 1)
endif()
if (NOT OGRE_CONFIG_ENABLE_ZIP)
set(OGRE_SET_DISABLE_ZIP 1)
endif()
if (NOT OGRE_CONFIG_ENABLE_LIBCPP_SUPPORT)
set(OGRE_SET_DISABLE_LIBCPP_SUPPORT 1)
endif()
if (NOT OGRE_CONFIG_ENABLE_VIEWPORT_ORIENTATIONMODE)
set(OGRE_SET_DISABLE_VIEWPORT_ORIENTATIONMODE 1)
endif()
Expand All @@ -137,11 +144,8 @@ endif()
if (NOT OGRE_CONFIG_ENABLE_GLES2_VAO_SUPPORT)
set(OGRE_SET_DISABLE_GLES2_VAO_SUPPORT 1)
endif()
if (NOT OGRE_CONFIG_ENABLE_GLES_STATE_CACHE_SUPPORT)
set(OGRE_SET_DISABLE_GLES_STATE_CACHE_SUPPORT 1)
endif()
if (NOT OGRE_CONFIG_ENABLE_GLES2_STATE_CACHE_SUPPORT)
set(OGRE_SET_DISABLE_GLES2_STATE_CACHE_SUPPORT 1)
if (NOT OGRE_CONFIG_ENABLE_GL_STATE_CACHE_SUPPORT)
set(OGRE_SET_DISABLE_GL_STATE_CACHE_SUPPORT 1)
endif()
if (NOT OGRE_CONFIG_ENABLE_GLES3_SUPPORT)
set(OGRE_SET_DISABLE_GLES3_SUPPORT 1)
Expand All @@ -168,13 +172,13 @@ else ()
set(RTSHADER_SYSTEM_BUILD_CORE_SHADERS 0)
endif ()

if (OGRE_BUILD_RTSHADERSYSTEM_EXT_SHADERS)
if (OGRE_BUILD_RTSHADERSYSTEM_EXT_SHADERS)
set(RTSHADER_SYSTEM_BUILD_EXT_SHADERS 1)
else ()
set(RTSHADER_SYSTEM_BUILD_EXT_SHADERS 0)
endif ()

# generate OgreBuildSettings.h
# generate OgreBuildSettings.h
configure_file(${OGRE_TEMPLATES_DIR}/OgreBuildSettings.h.in ${OGRE_BINARY_DIR}/include/OgreBuildSettings.h @ONLY)
install(FILES ${OGRE_BINARY_DIR}/include/OgreBuildSettings.h DESTINATION include/OGRE)

Expand Down Expand Up @@ -214,12 +218,12 @@ if (UNIX)
install(FILES ${OGRE_BINARY_DIR}/pkgconfig/OGRE.pc DESTINATION ${OGRE_LIB_DIRECTORY}/pkgconfig)

# configure additional packages

if (OGRE_BUILD_PLUGIN_PCZ)
configure_file(${OGRE_TEMPLATES_DIR}/OGRE-PCZ.pc.in ${OGRE_BINARY_DIR}/pkgconfig/OGRE-PCZ.pc @ONLY)
install(FILES ${OGRE_BINARY_DIR}/pkgconfig/OGRE-PCZ.pc DESTINATION ${OGRE_LIB_DIRECTORY}/pkgconfig)
endif ()

if (OGRE_BUILD_COMPONENT_PAGING)
configure_file(${OGRE_TEMPLATES_DIR}/OGRE-Paging.pc.in ${OGRE_BINARY_DIR}/pkgconfig/OGRE-Paging.pc @ONLY)
install(FILES ${OGRE_BINARY_DIR}/pkgconfig/OGRE-Paging.pc DESTINATION ${OGRE_LIB_DIRECTORY}/pkgconfig)
Expand Down Expand Up @@ -286,4 +290,4 @@ endif(OGRE_CONFIG_STATIC_LINK_CRT)
# ${OGRE_BINARY_DIR}/cmake/OGREConfigVersion.cmake
# DESTINATION ${OGRE_CMAKE_DIR}
# )
#
#
45 changes: 17 additions & 28 deletions CMake/Dependencies.cmake
Expand Up @@ -97,8 +97,8 @@ endif ()

# Find OpenGL
if(NOT ANDROID AND NOT FLASHCC)
find_package(OpenGL)
macro_log_feature(OPENGL_FOUND "OpenGL" "Support for the OpenGL render system" "http://www.opengl.org/" FALSE "" "")
find_package(OpenGL)
macro_log_feature(OPENGL_FOUND "OpenGL" "Support for the OpenGL render system" "http://www.opengl.org/" FALSE "" "")
endif()

# Find OpenGL 3+
Expand Down Expand Up @@ -147,7 +147,7 @@ endif ()
if (APPLE AND OGRE_BUILD_PLATFORM_APPLE_IOS)
set(Boost_USE_MULTITHREADED OFF)
endif()
set(Boost_ADDITIONAL_VERSIONS "1.54" "1.54.0" "1.53" "1.53.0" "1.52" "1.52.0" "1.51" "1.51.0" "1.50" "1.50.0" "1.49" "1.49.0" "1.48" "1.48.0" "1.47" "1.47.0" "1.46" "1.46.0" "1.45" "1.45.0" "1.44" "1.44.0" "1.42" "1.42.0" "1.41.0" "1.41" "1.40.0" "1.40")
set(Boost_ADDITIONAL_VERSIONS "1.55" "1.55.0" "1.54" "1.54.0" "1.53" "1.53.0" "1.52" "1.52.0" "1.51" "1.51.0" "1.50" "1.50.0" "1.49" "1.49.0" "1.48" "1.48.0" "1.47" "1.47.0" "1.46" "1.46.0" "1.45" "1.45.0" "1.44" "1.44.0" "1.42" "1.42.0" "1.41.0" "1.41" "1.40.0" "1.40")
# Components that need linking (NB does not include header-only components like bind)
set(OGRE_BOOST_COMPONENTS thread date_time)
find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
Expand All @@ -170,13 +170,25 @@ if(Boost_FOUND AND Boost_VERSION GREATER 104900)
find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
endif()

if(Boost_VERSION GREATER 105200)
# Use boost threading version 4 for boost 1.53 and above
add_definitions( -DBOOST_THREAD_VERSION=4 )
endif()

if(Boost_FOUND AND NOT WIN32)
list(REMOVE_DUPLICATES Boost_LIBRARIES)
endif()

# Optional Boost libs (Boost_${COMPONENT}_FOUND
macro_log_feature(Boost_FOUND "boost" "Boost (general)" "http://boost.org" FALSE "" "")
macro_log_feature(Boost_THREAD_FOUND "boost-thread" "Used for threading support" "http://boost.org" FALSE "" "")
macro_log_feature(Boost_DATE_TIME_FOUND "boost-date_time" "Used for threading support" "http://boost.org" FALSE "" "")
if(Boost_VERSION GREATER 104900)
macro_log_feature(Boost_SYSTEM_FOUND "boost-system" "Used for threading support" "http://boost.org" FALSE "" "")
macro_log_feature(Boost_CHRONO_FOUND "boost-chrono" "Used for threading support" "http://boost.org" FALSE "" "")
if(Boost_VERSION GREATER 105300)
macro_log_feature(Boost_ATOMIC_FOUND "boost-atomic" "Used for threading support" "http://boost.org" FALSE "" "")
endif()
endif()

# POCO
Expand Down Expand Up @@ -208,8 +220,8 @@ if (OGRE_BUILD_PLATFORM_WINRT)
set(OIS_INCLUDE_DIRS ${OIS_INCLUDE_DIR})
macro_log_feature(OIS_INCLUDE_DIRS "OIS" "Input library needed for the samples" "http://sourceforge.net/projects/wgois" FALSE "" "")
else ()
find_package(OIS)
macro_log_feature(OIS_FOUND "OIS" "Input library needed for the samples" "http://sourceforge.net/projects/wgois" FALSE "" "")
find_package(OIS)
macro_log_feature(OIS_FOUND "OIS" "Input library needed for the samples" "http://sourceforge.net/projects/wgois" FALSE "" "")
endif ()

#######################################################################
Expand All @@ -233,26 +245,6 @@ macro_log_feature(TINYXML_FOUND "TinyXML" "TinyXML needed for building OgreXMLCo
find_package(CppUnit)
macro_log_feature(CppUnit_FOUND "CppUnit" "Library for performing unit tests" "http://cppunit.sourceforge.net" FALSE "" "")

#######################################################################
# Apple-specific
#######################################################################
if (APPLE)
if (NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
find_package(Carbon)
macro_log_feature(Carbon_FOUND "Carbon" "Carbon" "http://developer.apple.com/mac" TRUE "" "")

find_package(Cocoa)
macro_log_feature(Cocoa_FOUND "Cocoa" "Cocoa" "http://developer.apple.com/mac" TRUE "" "")

find_package(IOKit)
macro_log_feature(IOKit_FOUND "IOKit" "IOKit HID framework needed by the samples" "http://developer.apple.com/mac" FALSE "" "")

find_package(CoreVideo)
macro_log_feature(CoreVideo_FOUND "CoreVideo" "CoreVideo" "http://developer.apple.com/mac" TRUE "" "")
endif (NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
endif(APPLE)


# now see if we have a buildable Dependencies package in
# the source tree. If so, include that, and it will take care of
# setting everything up, including overriding any of the above
Expand Down Expand Up @@ -283,9 +275,6 @@ include_directories(
${X11_INCLUDE_DIR}
${DirectX_INCLUDE_DIRS}
${CppUnit_INCLUDE_DIRS}
${Carbon_INCLUDE_DIRS}
${Cocoa_INCLUDE_DIRS}
${CoreVideo_INCLUDE_DIRS}
${GLSL_Optimizer_INCLUDE_DIRS}
${HLSL2GLSL_INCLUDE_DIRS}
)
Expand Down
9 changes: 8 additions & 1 deletion CMake/DependenciesOgreKit.cmake
Expand Up @@ -44,7 +44,9 @@ endif()
if (WIN32)
# Find OpenGLES2
#find_package(OpenGLES2)

find_package(AngleGLES2)

macro_log_feature(OPENGLES2_FOUND "OpenGLES2" "Support for the OpenGLES2 render system" "" FALSE "" "")

find_package(DirectX)
Expand All @@ -57,12 +59,17 @@ if (WIN32)
macro_log_feature(DirectX11_FOUND "DirectX11" "Support for the DirectX11 render system" "http://msdn.microsoft.com/en-us/directx/" FALSE "" "")
endif()

if (OGREKIT_BUILD_NACL)
find_package(NaClGLES2)
endif()



# Find Cg (Disabled Not used right now!)
# find_package(Cg)
# macro_log_feature(Cg_FOUND "cg" "C for graphics shader language" "http://developer.nvidia.com/object/cg_toolkit.html" FALSE "" "")

if(NOT WIN32 AND NOT OGREKIT_BUILD_ANDROID)
if(NOT WIN32 AND NOT OGREKIT_BUILD_ANDROID AND NOT OGREKIT_BUILD_NACL)
# Use static loader On win32 platforms

# Find OpenAL
Expand Down

0 comments on commit c3196a5

Please sign in to comment.