aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2011-03-07 11:38:57 +0000
committerJosé Fonseca <jfonseca@vmware.com>2011-03-07 13:02:04 +0000
commitc7ff7a94800176cf9860dee0253f35b11efdf4ec (patch)
tree3c75989dd06a0dac89a83edb69938c3cf6d286f9 /CMakeLists.txt
parent5d357f140ddc09c794e907181cc5ae9220112b20 (diff)
downloadpiglit-c7ff7a94800176cf9860dee0253f35b11efdf4ec.tar.gz
cmake: Allow GL/glext.h to be specified separately.
glext.h is not bundled on MSVC, so its path needs to be included separately. It might be also useful on other platforms to override the system's glext.h with a more recent one.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index af6b0b1b..3634bb45 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,6 +18,20 @@ IF (C_COMPILER_FLAG_WALL)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
ENDIF (C_COMPILER_FLAG_WALL)
+if (APPLE)
+ find_path(GLEXT_INCLUDE_DIR
+ NAMES OpenGL/glext.h
+ PATHS ${OPENGL_INCLUDE_DIR}
+ DOC "Include for OpenGL/glext.h on OSX"
+ )
+else (APPLE)
+ find_path(GLEXT_INCLUDE_DIR
+ NAMES GL/glext.h
+ PATHS ${OPENGL_INCLUDE_DIR}
+ DOC "Include for GL/glext.h"
+ )
+endif (APPLE)
+
FIND_LIBRARY(OPENGL_egl_LIBRARY
NAMES EGL
PATHS /usr/lib