Changed FindOGRE a bit to make it easier to find a source build of Ogre. (At least on windows)

actorid
Alexander "Ace" Olofsson 13 years ago
parent 2608491906
commit bfb3a4a36b

@ -26,13 +26,15 @@ IF (WIN32) #Windows
SET(OGRE_INCLUDE_DIR ${OGRESDK}/include) SET(OGRE_INCLUDE_DIR ${OGRESDK}/include)
SET(OGRE_LIB_DIR ${OGRESDK}/lib) SET(OGRE_LIB_DIR ${OGRESDK}/lib)
SET(OGRE_LIBRARIES debug OgreMain_d optimized OgreMain) SET(OGRE_LIBRARIES debug OgreMain_d optimized OgreMain)
ENDIF (OGRESDK) ELSEIF (OGRESOURCE)
IF (OGRESOURCE)
MESSAGE(STATUS "Using OGRE built from source") MESSAGE(STATUS "Using OGRE built from source")
SET(OGRE_INCLUDE_DIR $ENV{OGRE_SRC}/OgreMain/include) SET(OGRE_INCLUDE_DIR $ENV{OGRE_SRC}/OgreMain/include)
SET(OGRE_LIB_DIR $ENV{OGRE_SRC}/lib) SET(OGRE_LIB_DIR $ENV{OGRE_SRC}/lib)
SET(OGRE_LIBRARIES debug OgreMain_d optimized OgreMain) SET(OGRE_LIBRARIES debug OgreMain_d optimized OgreMain)
ENDIF (OGRESOURCE) ELSE (OGRESDK)
MESSAGE(STATUS "Using OGRE paths from CMake")
SET(OGRE_LIBRARIES debug OgreMain_d optimized OgreMain)
ENDIF (OGRESDK)
ENDIF (WIN32) ENDIF (WIN32)
IF (UNIX AND NOT APPLE) IF (UNIX AND NOT APPLE)
@ -80,9 +82,12 @@ SET(OGRE_LIB_DIR ${OGRE_LIB_DIR} CACHE PATH "")
if(OGRE_LIB_DIR) if(OGRE_LIB_DIR)
CMAKE_POLICY(SET CMP0009 NEW) CMAKE_POLICY(SET CMP0009 NEW)
IF (NOT APPLE) IF (WIN32)
FILE(GLOB_RECURSE OGRE_PLUGINS "${OGRE_LIB_DIR}/Plugin_*.lib")
ENDIF (WIN32)
IF (NOT APPLE AND NOT WIN32)
FILE(GLOB_RECURSE OGRE_PLUGINS "${OGRE_LIB_DIR}/Plugin_*.so") FILE(GLOB_RECURSE OGRE_PLUGINS "${OGRE_LIB_DIR}/Plugin_*.so")
ENDIF (NOT APPLE) ENDIF (NOT APPLE AND NOT WIN32)
IF (APPLE) IF (APPLE)
FILE(GLOB_RECURSE OGRE_PLUGINS "${OGRE_LIB_DIR}/Plugin_*.dylib") FILE(GLOB_RECURSE OGRE_PLUGINS "${OGRE_LIB_DIR}/Plugin_*.dylib")
ENDIF (APPLE) ENDIF (APPLE)

Loading…
Cancel
Save