Module: Demos Branch: master Commit: d014902154033339f0bea1a159cb1375ba6bd04d URL: http://cgit.freedesktop.org/mesa/demos/commit/?id=d014902154033339f0bea1a159cb1375ba6bd04d
Author: José Fonseca <jose.r.fons...@gmail.com> Date: Tue Oct 21 20:26:04 2014 +0100 cmake: Define HAVE_FREEGLUT when glutInitContextProfile symbol is present. Just like the configure.ac does. Trivial. --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 88a8b88..c3e217f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ project (mesademos) include (FindPkgConfig) include (CheckCCompilerFlag) +include (CheckSymbolExists) find_package (OpenGL REQUIRED) find_package (GLUT REQUIRED) @@ -25,6 +26,14 @@ if (PKG_CONFIG_FOUND AND NOT WIN32) pkg_check_modules (VG vg) endif () +# Check for FreeGLUT 2.6 or later +set (CMAKE_REQUIRED_INCLUDES "${GLUT_INCLUDE_DIR}") +set (CMAKE_REQUIRED_LIBRARIES "${GLUT_glut_LIBRARY}") +check_symbol_exists ("glutInitContextProfile" "GL/glut.h;GL/freeglut.h" HAVE_FREEGLUT) +if (HAVE_FREEGLUT) + add_definitions (-DHAVE_FREEGLUT) +endif () + if (UNIX) link_libraries(m) endif (UNIX) _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit