Demos (master): cmake: Allow to specify glext headers include path.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Tue Aug 2 12:17:59 PDT 2011


Module: Demos
Branch: master
Commit: 838c703bb9be6d89a226f2239dbb44c85d53da57
URL:    http://cgit.freedesktop.org/mesa/demos/commit/?id=838c703bb9be6d89a226f2239dbb44c85d53da57

Author: José Fonseca <jfonseca at vmware.com>
Date:   Tue Aug  2 20:17:50 2011 +0100

cmake: Allow to specify glext headers include path.

In order to pick different (i.e., newer) headers than the system ones.

---

 CMakeLists.txt               |   14 ++++++++++++++
 src/demos/CMakeLists.txt     |    1 +
 src/fp/CMakeLists.txt        |    1 +
 src/fpglsl/CMakeLists.txt    |    1 +
 src/glsl/CMakeLists.txt      |    1 +
 src/gs/CMakeLists.txt        |    1 +
 src/objviewer/CMakeLists.txt |    1 +
 src/perf/CMakeLists.txt      |    1 +
 src/redbook/CMakeLists.txt   |    1 +
 src/samples/CMakeLists.txt   |    1 +
 src/slang/CMakeLists.txt     |    1 +
 src/tests/CMakeLists.txt     |    1 +
 src/trivial/CMakeLists.txt   |    1 +
 src/util/CMakeLists.txt      |    1 +
 src/vp/CMakeLists.txt        |    1 +
 src/vpglsl/CMakeLists.txt    |    1 +
 src/wgl/CMakeLists.txt       |    1 +
 17 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index dbb3359..48f218f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,6 +16,20 @@ find_path (GLEW_INCLUDE_DIR GL/glew.h
       /usr/include/GL
 )
 
+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)
+
 if (UNIX)
 	link_libraries(m)
 endif (UNIX)
diff --git a/src/demos/CMakeLists.txt b/src/demos/CMakeLists.txt
index f1bcc03..e6eadc9 100644
--- a/src/demos/CMakeLists.txt
+++ b/src/demos/CMakeLists.txt
@@ -1,5 +1,6 @@
 include_directories (
 	${CMAKE_SOURCE_DIR}/src/util
+	${GLEXT_INCLUDE_DIR}
 	${OPENGL_INCLUDE_PATH}
 	${GLUT_INCLUDE_DIR}
 	${GLEW_INCLUDE_DIR}
diff --git a/src/fp/CMakeLists.txt b/src/fp/CMakeLists.txt
index a8aaad2..0ce0f27 100644
--- a/src/fp/CMakeLists.txt
+++ b/src/fp/CMakeLists.txt
@@ -1,5 +1,6 @@
 include_directories (
 	${CMAKE_SOURCE_DIR}/src/util
+	${GLEXT_INCLUDE_DIR}
 	${OPENGL_INCLUDE_PATH}
 	${GLUT_INCLUDE_DIR}
 	${GLEW_INCLUDE_DIR}
diff --git a/src/fpglsl/CMakeLists.txt b/src/fpglsl/CMakeLists.txt
index deb335b..6ad0f7b 100644
--- a/src/fpglsl/CMakeLists.txt
+++ b/src/fpglsl/CMakeLists.txt
@@ -1,5 +1,6 @@
 include_directories (
 	${CMAKE_SOURCE_DIR}/src/util
+	${GLEXT_INCLUDE_DIR}
 	${OPENGL_INCLUDE_PATH}
 	${GLUT_INCLUDE_DIR}
 	${GLEW_INCLUDE_DIR}
diff --git a/src/glsl/CMakeLists.txt b/src/glsl/CMakeLists.txt
index 11f8e37..fb6ca1f 100644
--- a/src/glsl/CMakeLists.txt
+++ b/src/glsl/CMakeLists.txt
@@ -1,5 +1,6 @@
 include_directories (
 	${CMAKE_SOURCE_DIR}/src/util
+	${GLEXT_INCLUDE_DIR}
 	${OPENGL_INCLUDE_PATH}
 	${GLUT_INCLUDE_DIR}
 	${GLEW_INCLUDE_DIR}
diff --git a/src/gs/CMakeLists.txt b/src/gs/CMakeLists.txt
index eef685d..1354017 100644
--- a/src/gs/CMakeLists.txt
+++ b/src/gs/CMakeLists.txt
@@ -1,5 +1,6 @@
 include_directories (
 	${CMAKE_SOURCE_DIR}/src/util
+	${GLEXT_INCLUDE_DIR}
 	${OPENGL_INCLUDE_PATH}
 	${GLUT_INCLUDE_DIR}
 	${GLEW_INCLUDE_DIR}
diff --git a/src/objviewer/CMakeLists.txt b/src/objviewer/CMakeLists.txt
index fc61720..fd78840 100644
--- a/src/objviewer/CMakeLists.txt
+++ b/src/objviewer/CMakeLists.txt
@@ -1,5 +1,6 @@
 include_directories (
 	${CMAKE_SOURCE_DIR}/src/util
+	${GLEXT_INCLUDE_DIR}
 	${OPENGL_INCLUDE_PATH}
 	${GLUT_INCLUDE_DIR}
 	${GLEW_INCLUDE_DIR}
diff --git a/src/perf/CMakeLists.txt b/src/perf/CMakeLists.txt
index 68b6875..ef24ee5 100644
--- a/src/perf/CMakeLists.txt
+++ b/src/perf/CMakeLists.txt
@@ -1,5 +1,6 @@
 include_directories (
 	${CMAKE_SOURCE_DIR}/src/util
+	${GLEXT_INCLUDE_DIR}
 	${OPENGL_INCLUDE_PATH}
 	${GLUT_INCLUDE_DIR}
 	${GLEW_INCLUDE_DIR}
diff --git a/src/redbook/CMakeLists.txt b/src/redbook/CMakeLists.txt
index 37201af..1210150 100644
--- a/src/redbook/CMakeLists.txt
+++ b/src/redbook/CMakeLists.txt
@@ -1,5 +1,6 @@
 include_directories (
 	${CMAKE_SOURCE_DIR}/src/util
+	${GLEXT_INCLUDE_DIR}
 	${OPENGL_INCLUDE_PATH}
 	${GLUT_INCLUDE_DIR}
 	${GLEW_INCLUDE_DIR}
diff --git a/src/samples/CMakeLists.txt b/src/samples/CMakeLists.txt
index b83ee91..978f769 100644
--- a/src/samples/CMakeLists.txt
+++ b/src/samples/CMakeLists.txt
@@ -1,5 +1,6 @@
 include_directories (
 	${CMAKE_SOURCE_DIR}/src/util
+	${GLEXT_INCLUDE_DIR}
 	${OPENGL_INCLUDE_PATH}
 	${GLUT_INCLUDE_DIR}
 	${GLEW_INCLUDE_DIR}
diff --git a/src/slang/CMakeLists.txt b/src/slang/CMakeLists.txt
index 8e5c7e1..e5d17fd 100644
--- a/src/slang/CMakeLists.txt
+++ b/src/slang/CMakeLists.txt
@@ -1,5 +1,6 @@
 include_directories (
 	${CMAKE_SOURCE_DIR}/src/util
+	${GLEXT_INCLUDE_DIR}
 	${OPENGL_INCLUDE_PATH}
 	${GLUT_INCLUDE_DIR}
 	${GLEW_INCLUDE_DIR}
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index c65505b..589bda1 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -1,5 +1,6 @@
 include_directories (
 	${CMAKE_SOURCE_DIR}/src/util
+	${GLEXT_INCLUDE_DIR}
 	${OPENGL_INCLUDE_PATH}
 	${GLUT_INCLUDE_DIR}
 	${GLEW_INCLUDE_DIR}
diff --git a/src/trivial/CMakeLists.txt b/src/trivial/CMakeLists.txt
index 26598a0..0bb40b7 100644
--- a/src/trivial/CMakeLists.txt
+++ b/src/trivial/CMakeLists.txt
@@ -1,5 +1,6 @@
 include_directories (
 	${CMAKE_SOURCE_DIR}/src/util
+	${GLEXT_INCLUDE_DIR}
 	${OPENGL_INCLUDE_PATH}
 	${GLUT_INCLUDE_DIR}
 	${GLEW_INCLUDE_DIR}
diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt
index a3ea7b4..2018428 100644
--- a/src/util/CMakeLists.txt
+++ b/src/util/CMakeLists.txt
@@ -1,5 +1,6 @@
 include_directories(
 	${CMAKE_SOURCE_DIR}/src/util
+	${GLEXT_INCLUDE_DIR}
 	${OPENGL_INCLUDE_PATH}
 	${GLUT_INCLUDE_DIR}
 	${GLEW_INCLUDE_DIR}
diff --git a/src/vp/CMakeLists.txt b/src/vp/CMakeLists.txt
index 5bc4911..1395b57 100644
--- a/src/vp/CMakeLists.txt
+++ b/src/vp/CMakeLists.txt
@@ -1,5 +1,6 @@
 include_directories (
 	${CMAKE_SOURCE_DIR}/src/util
+	${GLEXT_INCLUDE_DIR}
 	${OPENGL_INCLUDE_PATH}
 	${GLUT_INCLUDE_DIR}
 	${GLEW_INCLUDE_DIR}
diff --git a/src/vpglsl/CMakeLists.txt b/src/vpglsl/CMakeLists.txt
index 36ee986..7e29b20 100644
--- a/src/vpglsl/CMakeLists.txt
+++ b/src/vpglsl/CMakeLists.txt
@@ -1,5 +1,6 @@
 include_directories (
 	${CMAKE_SOURCE_DIR}/src/util
+	${GLEXT_INCLUDE_DIR}
 	${OPENGL_INCLUDE_PATH}
 	${GLUT_INCLUDE_DIR}
 	${GLEW_INCLUDE_DIR}
diff --git a/src/wgl/CMakeLists.txt b/src/wgl/CMakeLists.txt
index 834e836..950e352 100644
--- a/src/wgl/CMakeLists.txt
+++ b/src/wgl/CMakeLists.txt
@@ -1,4 +1,5 @@
 include_directories (
+	${GLEXT_INCLUDE_DIR}
 	${OPENGL_INCLUDE_PATH}
 	${GLEW_INCLUDE_DIR}
 )



More information about the mesa-commit mailing list