[waffle] [PATCH] cmake: Find and set include path for wglext.h
jfonseca at vmware.com
jfonseca at vmware.com
Sun Nov 23 01:32:19 PST 2014
From: José Fonseca <jfonseca at vmware.com>
GL/*glext.h is not provided by the system (be it MinGW or MSVC), so its
path must be specified separately.
I used GLEXT_INCLUDE_DIR, which is the name also used for Piglit, so
that existing CMake initial caches might already provide it.
---
cmake/Modules/WaffleFindDependencies.cmake | 6 ++++++
src/waffle/CMakeLists.txt | 1 +
2 files changed, 7 insertions(+)
diff --git a/cmake/Modules/WaffleFindDependencies.cmake b/cmake/Modules/WaffleFindDependencies.cmake
index 9245772..1c617f7 100644
--- a/cmake/Modules/WaffleFindDependencies.cmake
+++ b/cmake/Modules/WaffleFindDependencies.cmake
@@ -80,3 +80,9 @@ if(waffle_on_linux)
waffle_pkg_config(gbm gbm)
waffle_pkg_config(libudev libudev)
endif()
+
+
+if(waffle_on_windows)
+ find_package(OpenGL REQUIRED)
+ find_path(GLEXT_INCLUDE_DIR NAMES GL/wglext.h DOC "Include for GL/wglext.h")
+endif()
diff --git a/src/waffle/CMakeLists.txt b/src/waffle/CMakeLists.txt
index 5c63c47..aef0952 100644
--- a/src/waffle/CMakeLists.txt
+++ b/src/waffle/CMakeLists.txt
@@ -23,6 +23,7 @@ include_directories(
${egl_INCLUDE_DIRS}
${gbm_INCLUDE_DIRS}
${gl_INCLUDE_DIRS}
+ ${GLEXT_INCLUDE_DIR}
${libudev_INCLUDE_DIRS}
${wayland-client_INCLUDE_DIRS}
${wayland-egl_INCLUDE_DIRS}
--
1.9.1
More information about the waffle
mailing list