summaryrefslogtreecommitdiffstats
path: root/Modules/FindGLU.cmake
diff options
context:
space:
mode:
authorSebastien Barre <sebastien.barre@kitware.com>2002-06-17 17:07:32 (GMT)
committerSebastien Barre <sebastien.barre@kitware.com>2002-06-17 17:07:32 (GMT)
commit5458a0b50aa6bb701e6fe089c2706b4e034e4e1d (patch)
tree9540681f173f488ec86b0c93b45e9996e58ec19c /Modules/FindGLU.cmake
parent64a1707aeee16dcfac31e770b0869d9fc9c56ad2 (diff)
downloadCMake-5458a0b50aa6bb701e6fe089c2706b4e034e4e1d.zip
CMake-5458a0b50aa6bb701e6fe089c2706b4e034e4e1d.tar.gz
CMake-5458a0b50aa6bb701e6fe089c2706b4e034e4e1d.tar.bz2
FIX: GLU and GLUT flags for Mac OSX
Diffstat (limited to 'Modules/FindGLU.cmake')
-rw-r--r--Modules/FindGLU.cmake47
1 files changed, 28 insertions, 19 deletions
diff --git a/Modules/FindGLU.cmake b/Modules/FindGLU.cmake
index 7911c31..e349227 100644
--- a/Modules/FindGLU.cmake
+++ b/Modules/FindGLU.cmake
@@ -12,27 +12,36 @@ IF (WIN32)
SET (GLU_LIBRARY glu32 CACHE STRING "GLU library for win32")
ENDIF(BORLAND)
ELSE (WIN32)
- FIND_PATH(GLU_INCLUDE_PATH GL/glu.h
- ${OPENGL_INCLUDE_PATH}
- /usr/include
- /usr/local/include
- /usr/openwin/share/include
- /opt/graphics/OpenGL/include
- /usr/X11R6/include
- )
- MARK_AS_ADVANCED(
- GLU_INCLUDE_PATH
- )
+ IF (APPLE)
+ # The GLU lib is included in the OpenGL framework. We can not
+ # set GLU_LIBRARY to an empty string since it is equal to FALSE if
+ # this variable is used in a IF test. So let's set it to the OpenGL
+ # framework. It does not harm to duplicate the OpenGL framework and it
+ # might even help in case OPENGL_LIBRARY is not set.
+ SET(GLU_LIBRARY "-framework Carbon -framework AGL -framework OpenGL" CACHE STRING "GLU library for OSX")
+ ELSE (APPLE)
+ FIND_PATH(GLU_INCLUDE_PATH GL/glu.h
+ ${OPENGL_INCLUDE_PATH}
+ /usr/include
+ /usr/local/include
+ /usr/openwin/share/include
+ /opt/graphics/OpenGL/include
+ /usr/X11R6/include
+ )
+ MARK_AS_ADVANCED(
+ GLU_INCLUDE_PATH
+ )
- FIND_LIBRARY(GLU_LIBRARY GLU
- ${OPENGL_LIBRARY_PATH}
- /usr/lib
- /usr/local/lib
- /opt/graphics/OpenGL/lib
- /usr/openwin/lib
- /usr/X11R6/lib
- )
+ FIND_LIBRARY(GLU_LIBRARY GLU
+ ${OPENGL_LIBRARY_PATH}
+ /usr/lib
+ /usr/local/lib
+ /opt/graphics/OpenGL/lib
+ /usr/openwin/lib
+ /usr/X11R6/lib
+ )
+ ENDIF (APPLE)
ENDIF (WIN32)
MARK_AS_ADVANCED(