diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake index 9132cf017b..7bf2bf7166 100644 --- a/Modules/FindOpenGL.cmake +++ b/Modules/FindOpenGL.cmake @@ -19,7 +19,7 @@ ELSE (WIN32) ) - FIND_LIBRARY(OPENGL_LIB_PATH GL + FIND_LIBRARY(OPENGL_LIBRARY GL /usr/lib /usr/local/lib /opt/graphics/OpenGL/lib @@ -27,7 +27,4 @@ ELSE (WIN32) /usr/X11R6/lib ) - # right now we only look for -lgl maybe in future also mesa - SET (OPENGL_LIBRARY GL CACHE) - ENDIF (WIN32) \ No newline at end of file diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 447da7c8f5..da0afec309 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -799,7 +799,7 @@ std::string cmSystemTools::FindLibrary(const char* name, return cmSystemTools::CollapseFullPath(tryPath.c_str()); } tryPath = *p; - tryPath = "/lib"; + tryPath += "/lib"; tryPath += name; tryPath += ".a"; if(cmSystemTools::FileExists(tryPath.c_str())) @@ -807,7 +807,7 @@ std::string cmSystemTools::FindLibrary(const char* name, return cmSystemTools::CollapseFullPath(tryPath.c_str()); } tryPath = *p; - tryPath = "/lib"; + tryPath += "/lib"; tryPath += name; tryPath += ".sl"; if(cmSystemTools::FileExists(tryPath.c_str()))