|
|
|
@ -28,12 +28,11 @@
|
|
|
|
|
# Plugin_BSPSceneManager, Plugin_CgProgramManager,
|
|
|
|
|
# Plugin_OctreeSceneManager, Plugin_OctreeZone,
|
|
|
|
|
# Plugin_ParticleFX, Plugin_PCZSceneManager,
|
|
|
|
|
# RenderSystem_GL, RenderSystem_Direct3D9,
|
|
|
|
|
# RenderSystem_GL, RenderSystem_Direct3D9, RenderSystem_Direct3D10,
|
|
|
|
|
# Paging, Terrain
|
|
|
|
|
#
|
|
|
|
|
# For each of these components, the following variables are defined:
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
# OGRE_${COMPONENT}_FOUND - ${COMPONENT} is available
|
|
|
|
|
# OGRE_${COMPONENT}_INCLUDE_DIRS - additional include directories for ${COMPONENT}
|
|
|
|
|
# OGRE_${COMPONENT}_LIBRARIES - link these to use ${COMPONENT}
|
|
|
|
@ -128,7 +127,7 @@ endif ()
|
|
|
|
|
set(OGRE_COMPONENTS Paging Terrain
|
|
|
|
|
Plugin_BSPSceneManager Plugin_CgProgramManager Plugin_OctreeSceneManager
|
|
|
|
|
Plugin_OctreeZone Plugin_PCZSceneManager Plugin_ParticleFX
|
|
|
|
|
RenderSystem_Direct3D11 RenderSystem_Direct3D9 RenderSystem_GL RenderSystem_GLES RenderSystem_GLES2)
|
|
|
|
|
RenderSystem_Direct3D10 RenderSystem_Direct3D9 RenderSystem_GL RenderSystem_GLES)
|
|
|
|
|
set(OGRE_RESET_VARS
|
|
|
|
|
OGRE_CONFIG_INCLUDE_DIR OGRE_INCLUDE_DIR
|
|
|
|
|
OGRE_LIBRARY_FWK OGRE_LIBRARY_REL OGRE_LIBRARY_DBG
|
|
|
|
@ -145,7 +144,7 @@ clear_if_changed(OGRE_PREFIX_WATCH ${OGRE_RESET_VARS})
|
|
|
|
|
# try to locate Ogre via pkg-config
|
|
|
|
|
use_pkgconfig(OGRE_PKGC "OGRE${OGRE_LIB_SUFFIX}")
|
|
|
|
|
|
|
|
|
|
if(NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
|
|
|
|
|
if(NOT OGRE_BUILD_PLATFORM_IPHONE)
|
|
|
|
|
# try to find framework on OSX
|
|
|
|
|
findpkg_framework(OGRE)
|
|
|
|
|
else()
|
|
|
|
@ -236,7 +235,6 @@ if (OGRE_STATIC)
|
|
|
|
|
find_package(Freetype QUIET)
|
|
|
|
|
find_package(OpenGL QUIET)
|
|
|
|
|
find_package(OpenGLES QUIET)
|
|
|
|
|
find_package(OpenGLES2 QUIET)
|
|
|
|
|
find_package(ZLIB QUIET)
|
|
|
|
|
find_package(ZZip QUIET)
|
|
|
|
|
if (UNIX AND NOT APPLE)
|
|
|
|
@ -246,26 +244,28 @@ if (OGRE_STATIC)
|
|
|
|
|
set(X11_FOUND FALSE)
|
|
|
|
|
endif ()
|
|
|
|
|
endif ()
|
|
|
|
|
if (APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
|
|
|
|
|
if (APPLE AND NOT OGRE_BUILD_PLATFORM_IPHONE)
|
|
|
|
|
find_package(Cocoa QUIET)
|
|
|
|
|
find_package(Carbon QUIET)
|
|
|
|
|
find_package(CoreVideo QUIET)
|
|
|
|
|
if (NOT Cocoa_FOUND OR NOT Carbon_FOUND OR NOT CoreVideo_FOUND)
|
|
|
|
|
if (NOT Cocoa_FOUND OR NOT Carbon_FOUND)
|
|
|
|
|
set(OGRE_DEPS_FOUND FALSE)
|
|
|
|
|
endif ()
|
|
|
|
|
endif ()
|
|
|
|
|
if (APPLE AND OGRE_BUILD_PLATFORM_APPLE_IOS)
|
|
|
|
|
if (APPLE AND OGRE_BUILD_PLATFORM_IPHONE)
|
|
|
|
|
find_package(iPhoneSDK QUIET)
|
|
|
|
|
if (NOT iPhoneSDK_FOUND)
|
|
|
|
|
set(OGRE_DEPS_FOUND FALSE)
|
|
|
|
|
endif ()
|
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
|
|
set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${ZZip_LIBRARIES} ${ZLIB_LIBRARIES} ${FreeImage_LIBRARIES} ${FREETYPE_LIBRARIES} )
|
|
|
|
|
|
|
|
|
|
if (APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
|
|
|
|
|
set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${X11_LIBRARIES} ${X11_Xt_LIBRARIES} ${XAW_LIBRARY} ${X11_Xrandr_LIB} ${Carbon_LIBRARIES} ${Cocoa_LIBRARIES})
|
|
|
|
|
endif()
|
|
|
|
|
#set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${OGRE_LIBRARY_FWK} ${ZZip_LIBRARIES} ${ZLIB_LIBRARIES}
|
|
|
|
|
# ${FreeImage_LIBRARIES} ${FREETYPE_LIBRARIES}
|
|
|
|
|
# ${X11_LIBRARIES} ${X11_Xt_LIBRARIES} ${XAW_LIBRARY} ${X11_Xrandr_LIB}
|
|
|
|
|
# ${Cocoa_LIBRARIES} ${Carbon_LIBRARIES})
|
|
|
|
|
set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${ZZip_LIBRARIES} ${ZLIB_LIBRARIES}
|
|
|
|
|
${FreeImage_LIBRARIES} ${FREETYPE_LIBRARIES}
|
|
|
|
|
${X11_LIBRARIES} ${X11_Xt_LIBRARIES} ${XAW_LIBRARY} ${X11_Xrandr_LIB}
|
|
|
|
|
${Cocoa_LIBRARIES} ${Carbon_LIBRARIES})
|
|
|
|
|
|
|
|
|
|
if (NOT ZLIB_FOUND OR NOT ZZip_FOUND)
|
|
|
|
|
set(OGRE_DEPS_FOUND FALSE)
|
|
|
|
@ -445,9 +445,9 @@ macro(ogre_find_plugin PLUGIN HEADER)
|
|
|
|
|
PATH_SUFFIXES "" bin bin/debug debug)
|
|
|
|
|
elseif (UNIX)
|
|
|
|
|
get_filename_component(OGRE_PLUGIN_DIR_TMP ${OGRE_${PLUGIN}_LIBRARY_REL} PATH)
|
|
|
|
|
set(OGRE_PLUGIN_DIR_REL ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (release)" FORCE)
|
|
|
|
|
set(OGRE_PLUGIN_DIR_REL ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (release)")
|
|
|
|
|
get_filename_component(OGRE_PLUGIN_DIR_TMP ${OGRE_${PLUGIN}_LIBRARY_DBG} PATH)
|
|
|
|
|
set(OGRE_PLUGIN_DIR_DBG ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (debug)" FORCE)
|
|
|
|
|
set(OGRE_PLUGIN_DIR_DBG ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (debug)")
|
|
|
|
|
endif ()
|
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
|
@ -475,8 +475,8 @@ ogre_find_plugin(Plugin_OctreeSceneManager OgreOctreeSceneManager.h PlugIns/Octr
|
|
|
|
|
ogre_find_plugin(Plugin_ParticleFX OgreParticleFXPrerequisites.h PlugIns/ParticleFX/include)
|
|
|
|
|
ogre_find_plugin(RenderSystem_GL OgreGLRenderSystem.h RenderSystems/GL/include)
|
|
|
|
|
ogre_find_plugin(RenderSystem_GLES OgreGLESRenderSystem.h RenderSystems/GLES/include)
|
|
|
|
|
ogre_find_plugin(RenderSystem_GLES2 OgreGLES2RenderSystem.h RenderSystems/GLES2/include)
|
|
|
|
|
ogre_find_plugin(RenderSystem_Direct3D9 OgreD3D9RenderSystem.h RenderSystems/Direct3D9/include)
|
|
|
|
|
ogre_find_plugin(RenderSystem_Direct3D10 OgreD3D10RenderSystem.h RenderSystems/Direct3D10/include)
|
|
|
|
|
ogre_find_plugin(RenderSystem_Direct3D11 OgreD3D11RenderSystem.h RenderSystems/Direct3D11/include)
|
|
|
|
|
|
|
|
|
|
if (OGRE_STATIC)
|
|
|
|
@ -484,18 +484,18 @@ if (OGRE_STATIC)
|
|
|
|
|
if (NOT DirectX_FOUND)
|
|
|
|
|
set(OGRE_RenderSystem_Direct3D9_FOUND FALSE)
|
|
|
|
|
endif ()
|
|
|
|
|
if (NOT DirectX_D3D10_FOUND)
|
|
|
|
|
set(OGRE_RenderSystem_Direct3D10_FOUND FALSE)
|
|
|
|
|
endif ()
|
|
|
|
|
if (NOT DirectX_D3D11_FOUND)
|
|
|
|
|
set(OGRE_RenderSystem_Direct3D11_FOUND FALSE)
|
|
|
|
|
endif ()
|
|
|
|
|
if (NOT OPENGL_FOUND)
|
|
|
|
|
set(OGRE_RenderSystem_GL_FOUND FALSE)
|
|
|
|
|
endif ()
|
|
|
|
|
if (NOT OPENGLES_FOUND)
|
|
|
|
|
if (NOT OPENGLES_FOUND AND NOT OPENGLES2_FOUND)
|
|
|
|
|
set(OGRE_RenderSystem_GLES_FOUND FALSE)
|
|
|
|
|
endif ()
|
|
|
|
|
if (NOT OPENGLES2_FOUND)
|
|
|
|
|
set(OGRE_RenderSystem_GLES2_FOUND FALSE)
|
|
|
|
|
endif ()
|
|
|
|
|
if (NOT Cg_FOUND)
|
|
|
|
|
set(OGRE_Plugin_CgProgramManager_FOUND FALSE)
|
|
|
|
|
endif ()
|
|
|
|
@ -503,7 +503,9 @@ if (OGRE_STATIC)
|
|
|
|
|
set(OGRE_RenderSystem_Direct3D9_LIBRARIES ${OGRE_RenderSystem_Direct3D9_LIBRARIES}
|
|
|
|
|
${DirectX_LIBRARIES}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
set(OGRE_RenderSystem_Direct3D10_LIBRARIES ${OGRE_RenderSystem_Direct3D10_LIBRARIES}
|
|
|
|
|
${DirectX_D3D10_LIBRARIES}
|
|
|
|
|
)
|
|
|
|
|
set(OGRE_RenderSystem_Direct3D11_LIBRARIES ${OGRE_RenderSystem_Direct3D11_LIBRARIES}
|
|
|
|
|
${DirectX_D3D11_LIBRARIES}
|
|
|
|
|
)
|
|
|
|
@ -513,9 +515,6 @@ if (OGRE_STATIC)
|
|
|
|
|
set(OGRE_RenderSystem_GLES_LIBRARIES ${OGRE_RenderSystem_GLES_LIBRARIES}
|
|
|
|
|
${OPENGLES_LIBRARIES}
|
|
|
|
|
)
|
|
|
|
|
set(OGRE_RenderSystem_GLES2_LIBRARIES ${OGRE_RenderSystem_GLES2_LIBRARIES}
|
|
|
|
|
${OPENGLES2_LIBRARIES}
|
|
|
|
|
)
|
|
|
|
|
set(OGRE_Plugin_CgProgramManager_LIBRARIES ${OGRE_Plugin_CgProgramManager_LIBRARIES}
|
|
|
|
|
${Cg_LIBRARIES}
|
|
|
|
|
)
|
|
|
|
@ -540,3 +539,4 @@ set(OGRE_MEDIA_SEARCH_SUFFIX
|
|
|
|
|
clear_if_changed(OGRE_PREFIX_WATCH OGRE_MEDIA_DIR)
|
|
|
|
|
find_path(OGRE_MEDIA_DIR NAMES packs/cubemapsJS.zip HINTS ${OGRE_MEDIA_SEARCH_PATH}
|
|
|
|
|
PATHS ${OGRE_PREFIX_PATH} PATH_SUFFIXES ${OGRE_MEDIA_SEARCH_SUFFIX})
|
|
|
|
|
|
|
|
|
|