diff --git a/cmake/FindOGRE.cmake b/cmake/FindOGRE.cmake index 5554d7d08..eebb20338 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 59d456be7..b6e104351 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