Search for plugins in orgre lib directory

pull/21/head
Jan-Peter Nilsson 14 years ago
parent 851385d989
commit 753a4f681e

@ -69,6 +69,14 @@ SET(OGRE_INCLUDE_DIR ${OGRE_INCLUDE_DIR} CACHE PATH "")
SET(OGRE_LIBRARIES ${OGRE_LIBRARIES} CACHE STRING "") SET(OGRE_LIBRARIES ${OGRE_LIBRARIES} CACHE STRING "")
SET(OGRE_LIB_DIR ${OGRE_LIB_DIR} CACHE PATH "") SET(OGRE_LIB_DIR ${OGRE_LIB_DIR} CACHE PATH "")
if(OGRE_LIB_DIR)
CMAKE_POLICY(SET CMP0009 NEW)
FILE(GLOB_RECURSE OGRE_PLUGINS "${OGRE_LIB_DIR}/Plugin_*.so")
FOREACH (OGRE_PLUGINS_FILE ${OGRE_PLUGINS})
STRING(REGEX REPLACE "/[^/]*$" "" OGRE_PLUGIN_DIR ${OGRE_PLUGINS_FILE})
ENDFOREACH(OGRE_PLUGINS_FILE)
endif()
IF (OGRE_INCLUDE_DIR AND OGRE_LIBRARIES) IF (OGRE_INCLUDE_DIR AND OGRE_LIBRARIES)
SET(OGRE_FOUND TRUE) SET(OGRE_FOUND TRUE)
ENDIF (OGRE_INCLUDE_DIR AND OGRE_LIBRARIES) ENDIF (OGRE_INCLUDE_DIR AND OGRE_LIBRARIES)

@ -1,7 +1,7 @@
# Defines plugins to load # Defines plugins to load
# Define plugin folder # Define plugin folder
PluginFolder=${OGRE_LIB_DIR} PluginFolder=${OGRE_PLUGIN_DIR}
# Define plugins # Define plugins
Plugin=RenderSystem_GL Plugin=RenderSystem_GL

Loading…
Cancel
Save