CMake changes for using Ogre Overlay.

pull/300/head
cc9cii 10 years ago
parent 5ffb740120
commit 3aea1bf5f9

@ -198,6 +198,7 @@ endif(APPLE)
target_link_libraries(opencs target_link_libraries(opencs
${OGRE_LIBRARIES} ${OGRE_LIBRARIES}
${OGRE_Overlay_LIBRARIES}
${OGRE_STATIC_PLUGINS} ${OGRE_STATIC_PLUGINS}
${SHINY_LIBRARIES} ${SHINY_LIBRARIES}
${Boost_LIBRARIES} ${Boost_LIBRARIES}

@ -110,7 +110,7 @@ if (OGRE_PREFIX_SOURCE AND OGRE_PREFIX_BUILD)
set(OGRE_INC_SEARCH_PATH ${dir}/include ${OGRE_INC_SEARCH_PATH}) set(OGRE_INC_SEARCH_PATH ${dir}/include ${OGRE_INC_SEARCH_PATH})
set(OGRE_LIB_SEARCH_PATH ${dir}/lib ${OGRE_LIB_SEARCH_PATH}) set(OGRE_LIB_SEARCH_PATH ${dir}/lib ${OGRE_LIB_SEARCH_PATH})
set(OGRE_BIN_SEARCH_PATH ${dir}/bin ${OGRE_BIN_SEARCH_PATH}) set(OGRE_BIN_SEARCH_PATH ${dir}/bin ${OGRE_BIN_SEARCH_PATH})
set(OGRE_BIN_SEARCH_PATH ${dir}/Samples/Common/bin ${OGRE_BIN_SEARCH_PATH}) set(OGRE_BIN_SEARCH_PATH ${dir}/Samples/Common/bin ${OGRE_BIN_SEARCH_PATH})
endforeach(dir) endforeach(dir)
if (OGRE_PREFIX_DEPENDENCIES_DIR) if (OGRE_PREFIX_DEPENDENCIES_DIR)
@ -124,7 +124,7 @@ else()
endif () endif ()
# redo search if any of the environmental hints changed # redo search if any of the environmental hints changed
set(OGRE_COMPONENTS Paging Terrain set(OGRE_COMPONENTS Paging Terrain Overlay
Plugin_BSPSceneManager Plugin_CgProgramManager Plugin_OctreeSceneManager Plugin_BSPSceneManager Plugin_CgProgramManager Plugin_OctreeSceneManager
Plugin_OctreeZone Plugin_PCZSceneManager Plugin_ParticleFX Plugin_OctreeZone Plugin_PCZSceneManager Plugin_ParticleFX
RenderSystem_Direct3D10 RenderSystem_Direct3D9 RenderSystem_GL RenderSystem_GLES2) RenderSystem_Direct3D10 RenderSystem_Direct3D9 RenderSystem_GL RenderSystem_GLES2)
@ -148,7 +148,7 @@ if(NOT OGRE_BUILD_PLATFORM_IPHONE AND APPLE)
# try to find framework on OSX # try to find framework on OSX
findpkg_framework(OGRE) findpkg_framework(OGRE)
else() else()
set(OGRE_LIBRARY_FWK "") set(OGRE_LIBRARY_FWK "")
endif() endif()
# locate Ogre include files # locate Ogre include files
@ -215,8 +215,8 @@ list(REMOVE_DUPLICATES OGRE_INCLUDE_DIR)
findpkg_finish(OGRE) findpkg_finish(OGRE)
add_parent_dir(OGRE_INCLUDE_DIRS OGRE_INCLUDE_DIR) add_parent_dir(OGRE_INCLUDE_DIRS OGRE_INCLUDE_DIR)
if (OGRE_SOURCE) if (OGRE_SOURCE)
# If working from source rather than SDK, add samples include # If working from source rather than SDK, add samples include
set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} "${OGRE_SOURCE}/Samples/Common/include") set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} "${OGRE_SOURCE}/Samples/Common/include")
endif() endif()
mark_as_advanced(OGRE_CONFIG_INCLUDE_DIR OGRE_MEDIA_DIR OGRE_PLUGIN_DIR_REL OGRE_PLUGIN_DIR_DBG) mark_as_advanced(OGRE_CONFIG_INCLUDE_DIR OGRE_MEDIA_DIR OGRE_PLUGIN_DIR_REL OGRE_PLUGIN_DIR_DBG)
@ -279,9 +279,9 @@ endif()
set(OGRE_DEPS_FOUND FALSE) set(OGRE_DEPS_FOUND FALSE)
endif () endif ()
if (UNIX AND NOT APPLE AND NOT ANDROID) if (UNIX AND NOT APPLE AND NOT ANDROID)
if (NOT X11_FOUND) if (NOT X11_FOUND)
set(OGRE_DEPS_FOUND FALSE) set(OGRE_DEPS_FOUND FALSE)
endif () endif ()
endif () endif ()
if (OGRE_CONFIG_THREADS) if (OGRE_CONFIG_THREADS)
@ -329,13 +329,13 @@ set(OGRE_LIBRARY_DIRS ${OGRE_LIBRARY_DIR_REL} ${OGRE_LIBRARY_DIR_DBG})
# find binaries # find binaries
if (NOT OGRE_STATIC) if (NOT OGRE_STATIC)
if (WIN32) if (WIN32)
find_file(OGRE_BINARY_REL NAMES "OgreMain.dll" HINTS ${OGRE_BIN_SEARCH_PATH} find_file(OGRE_BINARY_REL NAMES "OgreMain.dll" HINTS ${OGRE_BIN_SEARCH_PATH}
PATH_SUFFIXES "" release relwithdebinfo minsizerel) PATH_SUFFIXES "" release relwithdebinfo minsizerel)
find_file(OGRE_BINARY_DBG NAMES "OgreMain_d.dll" HINTS ${OGRE_BIN_SEARCH_PATH} find_file(OGRE_BINARY_DBG NAMES "OgreMain_d.dll" HINTS ${OGRE_BIN_SEARCH_PATH}
PATH_SUFFIXES "" debug ) PATH_SUFFIXES "" debug )
endif() endif()
mark_as_advanced(OGRE_BINARY_REL OGRE_BINARY_DBG) mark_as_advanced(OGRE_BINARY_REL OGRE_BINARY_DBG)
endif() endif()
@ -366,17 +366,19 @@ macro(ogre_find_component COMPONENT HEADER)
if (OGRE_${COMPONENT}_FOUND) if (OGRE_${COMPONENT}_FOUND)
# find binaries # find binaries
if (NOT OGRE_STATIC) if (NOT OGRE_STATIC)
if (WIN32) if (WIN32)
find_file(OGRE_${COMPONENT}_BINARY_REL NAMES "Ogre${COMPONENT}.dll" HINTS ${OGRE_COMPONENT_SEARCH_PATH_REL} PATH_SUFFIXES "" bin bin/release bin/relwithdebinfo bin/minsizerel release) find_file(OGRE_${COMPONENT}_BINARY_REL NAMES "Ogre${COMPONENT}.dll" HINTS ${OGRE_COMPONENT_SEARCH_PATH_REL} PATH_SUFFIXES "" bin bin/release bin/relwithdebinfo bin/minsizerel release)
find_file(OGRE_${COMPONENT}_BINARY_DBG NAMES "Ogre${COMPONENT}_d.dll" HINTS ${OGRE_COMPONENT_SEARCH_PATH_DBG} PATH_SUFFIXES "" bin bin/debug debug) find_file(OGRE_${COMPONENT}_BINARY_DBG NAMES "Ogre${COMPONENT}_d.dll" HINTS ${OGRE_COMPONENT_SEARCH_PATH_DBG} PATH_SUFFIXES "" bin bin/debug debug)
endif() endif()
mark_as_advanced(OGRE_${COMPONENT}_BINARY_REL OGRE_${COMPONENT}_BINARY_DBG) mark_as_advanced(OGRE_${COMPONENT}_BINARY_REL OGRE_${COMPONENT}_BINARY_DBG)
endif() endif()
endif() endif()
endmacro() endmacro()
# look for Paging component # look for Paging component
ogre_find_component(Paging OgrePaging.h) ogre_find_component(Paging OgrePaging.h)
# look for Overlay component
ogre_find_component(Overlay OgreOverlay.h)
# look for Terrain component # look for Terrain component
ogre_find_component(Terrain OgreTerrain.h) ogre_find_component(Terrain OgreTerrain.h)
# look for Property component # look for Property component
@ -446,12 +448,12 @@ macro(ogre_find_plugin PLUGIN HEADER)
set(OGRE_PLUGIN_SEARCH_PATH_REL set(OGRE_PLUGIN_SEARCH_PATH_REL
${OGRE_LIBRARY_DIR_REL}/.. ${OGRE_LIBRARY_DIR_REL}/..
${OGRE_LIBRARY_DIR_REL}/../.. ${OGRE_LIBRARY_DIR_REL}/../..
${OGRE_BIN_SEARCH_PATH} ${OGRE_BIN_SEARCH_PATH}
) )
set(OGRE_PLUGIN_SEARCH_PATH_DBG set(OGRE_PLUGIN_SEARCH_PATH_DBG
${OGRE_LIBRARY_DIR_DBG}/.. ${OGRE_LIBRARY_DIR_DBG}/..
${OGRE_LIBRARY_DIR_DBG}/../.. ${OGRE_LIBRARY_DIR_DBG}/../..
${OGRE_BIN_SEARCH_PATH} ${OGRE_BIN_SEARCH_PATH}
) )
find_path(OGRE_PLUGIN_DIR_REL NAMES "${PLUGIN}.dll" HINTS ${OGRE_PLUGIN_SEARCH_PATH_REL} find_path(OGRE_PLUGIN_DIR_REL NAMES "${PLUGIN}.dll" HINTS ${OGRE_PLUGIN_SEARCH_PATH_REL}
PATH_SUFFIXES "" bin bin/release bin/relwithdebinfo bin/minsizerel release) PATH_SUFFIXES "" bin bin/release bin/relwithdebinfo bin/minsizerel release)
@ -469,14 +471,14 @@ macro(ogre_find_plugin PLUGIN HEADER)
endif () endif ()
endif () endif ()
# find binaries # find binaries
if (NOT OGRE_STATIC) if (NOT OGRE_STATIC)
if (WIN32) if (WIN32)
find_file(OGRE_${PLUGIN}_REL NAMES "${PLUGIN}.dll" HINTS ${OGRE_PLUGIN_DIR_REL}) find_file(OGRE_${PLUGIN}_REL NAMES "${PLUGIN}.dll" HINTS ${OGRE_PLUGIN_DIR_REL})
find_file(OGRE_${PLUGIN}_DBG NAMES "${PLUGIN}_d.dll" HINTS ${OGRE_PLUGIN_DIR_DBG}) find_file(OGRE_${PLUGIN}_DBG NAMES "${PLUGIN}_d.dll" HINTS ${OGRE_PLUGIN_DIR_DBG})
endif() endif()
mark_as_advanced(OGRE_${PLUGIN}_REL OGRE_${PLUGIN}_DBG) mark_as_advanced(OGRE_${PLUGIN}_REL OGRE_${PLUGIN}_DBG)
endif() endif()
endif () endif ()

Loading…
Cancel
Save