diff --git a/CMakeLists.txt b/CMakeLists.txt index 160b44d96..c2f9fca03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -534,7 +534,7 @@ ENDIF(DYNAMIC_OPENSCENEGRAPH) # Add a default plugin search path component IF (DYNAMIC_OPENSCENEGRAPH) - ADD_DEFINITIONS(-DOSG_DEFAULT_LIBRARY_PATH="${CMAKE_INSTALL_PREFIX}/lib${LIB_POSTFIX}/${OSG_PLUGINS}") + ADD_DEFINITIONS(-DOSG_DEFAULT_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib${LIB_POSTFIX}/${OSG_PLUGINS}) ENDIF(DYNAMIC_OPENSCENEGRAPH) INCLUDE(OsgMacroUtils) diff --git a/include/osg/Object b/include/osg/Object index bdc100770..73df9effe 100644 --- a/include/osg/Object +++ b/include/osg/Object @@ -25,6 +25,9 @@ namespace osg { // forward declare class State; +#define _ADDQUOTES(def) #def +#define ADDQUOTES(def) _ADDQUOTES(def) + /** META_Object macro define the standard clone, isSameKindAs and className methods. * Use when subclassing from Object to make it more convenient to define * the standard pure virtual clone, isSameKindAs and className methods diff --git a/src/osgDB/FileUtils.cpp b/src/osgDB/FileUtils.cpp index af49e703e..3a1ca1b56 100644 --- a/src/osgDB/FileUtils.cpp +++ b/src/osgDB/FileUtils.cpp @@ -367,8 +367,9 @@ std::string osgDB::findFileInDirectory(const std::string& fileName,const std::st static void appendInstallationLibraryFilePaths(osgDB::FilePathList& filepath) { #ifdef OSG_DEFAULT_LIBRARY_PATH + // Append the install prefix path to the library search path if configured - filepath.push_back(OSG_DEFAULT_LIBRARY_PATH); + filepath.push_back(ADDQUOTES(OSG_DEFAULT_LIBRARY_PATH)); #endif }