From 753a4f681e7cd2b08e17037f0e4548e2fea067a1 Mon Sep 17 00:00:00 2001 From: Jan-Peter Nilsson Date: Thu, 13 Jan 2011 21:18:20 +0100 Subject: [PATCH] Search for plugins in orgre lib directory --- cmake/FindOGRE.cmake | 8 ++++++++ files/plugins.cfg.linux | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cmake/FindOGRE.cmake b/cmake/FindOGRE.cmake index 5554d7d085..eebb20338e 100644 --- a/cmake/FindOGRE.cmake +++ b/cmake/FindOGRE.cmake @@ -69,6 +69,14 @@ SET(OGRE_INCLUDE_DIR ${OGRE_INCLUDE_DIR} CACHE PATH "") SET(OGRE_LIBRARIES ${OGRE_LIBRARIES} CACHE STRING "") 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) SET(OGRE_FOUND TRUE) ENDIF (OGRE_INCLUDE_DIR AND OGRE_LIBRARIES) diff --git a/files/plugins.cfg.linux b/files/plugins.cfg.linux index 59d456be7a..b6e104351d 100644 --- a/files/plugins.cfg.linux +++ b/files/plugins.cfg.linux @@ -1,7 +1,7 @@ # Defines plugins to load # Define plugin folder -PluginFolder=${OGRE_LIB_DIR} +PluginFolder=${OGRE_PLUGIN_DIR} # Define plugins Plugin=RenderSystem_GL