aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDylan Noblesmith <nobled@dreamwidth.org>2012-02-27 22:44:11 +0000
committerDylan Noblesmith <nobled@dreamwidth.org>2012-03-03 13:16:50 +0000
commitac16e8c519ad5b5f6f17a7da41d627338a3d2b0d (patch)
tree57444cb2aa55852d6590783ef31b1af4da2d5997 /CMakeLists.txt
parent50613560bf57ce4b77d1702bb1d2dade73218080 (diff)
downloadpiglit-ac16e8c519ad5b5f6f17a7da41d627338a3d2b0d.tar.gz
cmake: check for glproto headers
And error out when they're not found, rather than failing to compile later when GL/glxproto.h can't be found.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d56fd8c3..47c8b3fe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,7 @@ INCLUDE (CheckCCompilerFlag)
INCLUDE (CheckCXXCompilerFlag)
INCLUDE (CheckFunctionExists)
INCLUDE (CheckIncludeFile)
+INCLUDE (FindPkgConfig)
project (piglit)
@@ -13,6 +14,10 @@ find_package(GLUT REQUIRED)
find_package(PNG REQUIRED)
find_package(X11)
+IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ pkg_check_modules(GLPROTO REQUIRED glproto)
+ENDIF()
+
# The 'REQUIRED' above correctly produces an error for
# OpenGL and PNG, but there's a bug involving FindGLUT.cmake
# that fails to produce the error as of CMake 2.8.5.