diff options
author | Anas Nashif <anas.nashif@intel.com> | 2013-08-13 07:48:01 -0400 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2013-08-13 07:48:01 -0400 |
commit | 297c63fa65327491a2b50e521b661c5835a19fe4 (patch) | |
tree | cf30d58014e240eb5e4417727d8f137cdbe75828 /Modules/FindOpenGL.cmake | |
parent | ef8aa19c33e83ff019595fd7f8fdc29c35c336a3 (diff) | |
download | cmake-297c63fa65327491a2b50e521b661c5835a19fe4.tar.gz cmake-297c63fa65327491a2b50e521b661c5835a19fe4.tar.bz2 cmake-297c63fa65327491a2b50e521b661c5835a19fe4.zip |
Imported Upstream version 2.8.11.2upstream/2.8.11.2sandbox/pcoval/previous/upstream
Diffstat (limited to 'Modules/FindOpenGL.cmake')
-rw-r--r-- | Modules/FindOpenGL.cmake | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake index a6f450385..96c4d8db5 100644 --- a/Modules/FindOpenGL.cmake +++ b/Modules/FindOpenGL.cmake @@ -58,14 +58,22 @@ else () find_path(OPENGL_INCLUDE_DIR OpenGL/gl.h DOC "Include for OpenGL on OSX") else() - # Handle HP-UX cases where we only want to find OpenGL in either hpux64 - # or hpux32 depending on if we're doing a 64 bit build. - if(CMAKE_SIZEOF_VOID_P EQUAL 4) - set(HPUX_IA_OPENGL_LIB_PATH /opt/graphics/OpenGL/lib/hpux32/) - else() - set(HPUX_IA_OPENGL_LIB_PATH - /opt/graphics/OpenGL/lib/hpux64/ - /opt/graphics/OpenGL/lib/pa20_64) + if (CMAKE_SYSTEM_NAME MATCHES "HP-UX") + # Handle HP-UX cases where we only want to find OpenGL in either hpux64 + # or hpux32 depending on if we're doing a 64 bit build. + if(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(_OPENGL_LIB_PATH + /opt/graphics/OpenGL/lib/hpux32/) + else() + set(_OPENGL_LIB_PATH + /opt/graphics/OpenGL/lib/hpux64/ + /opt/graphics/OpenGL/lib/pa20_64) + endif() + elseif(CMAKE_SYSTEM_NAME STREQUAL Haiku) + set(_OPENGL_LIB_PATH + /boot/develop/lib/x86) + set(_OPENGL_INCLUDE_PATH + /boot/develop/headers/os/opengl) endif() # The first line below is to make sure that the proper headers @@ -80,6 +88,7 @@ else () /usr/share/doc/NVIDIA_GLX-1.0/include /usr/openwin/share/include /opt/graphics/OpenGL/include /usr/X11R6/include + ${_OPENGL_INCLUDE_PATH} ) find_path(OPENGL_xmesa_INCLUDE_DIR GL/xmesa.h @@ -93,9 +102,12 @@ else () PATHS /opt/graphics/OpenGL/lib /usr/openwin/lib /usr/shlib /usr/X11R6/lib - ${HPUX_IA_OPENGL_LIB_PATH} + ${_OPENGL_LIB_PATH} ) + unset(_OPENGL_INCLUDE_PATH) + unset(_OPENGL_LIB_PATH) + # On Unix OpenGL most certainly always requires X11. # Feel free to tighten up these conditions if you don't # think this is always true. @@ -103,7 +115,7 @@ else () if (OPENGL_gl_LIBRARY) if(NOT X11_FOUND) - include(FindX11) + include(${CMAKE_CURRENT_LIST_DIR}/FindX11.cmake) endif() if (X11_FOUND) if (NOT APPLE) |