From 56e1a441b4e9d303744ff40c3b1b722f0f11ddac Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Thu, 24 Oct 2019 00:01:48 +0200 Subject: [PATCH] build: Only conditionally mention the GL headers in external. They might be dropped form distro source packages since they're duplicates. --- external/include/CMakeLists.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/external/include/CMakeLists.txt b/external/include/CMakeLists.txt index 6fe7ca12b..1f1f3f3ac 100644 --- a/external/include/CMakeLists.txt +++ b/external/include/CMakeLists.txt @@ -2,9 +2,16 @@ set( INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" ) set( GL_HEADERS - ${INCLUDE_DIR}/GL/gl_format.h - ${INCLUDE_DIR}/GL/glext.h - ${INCLUDE_DIR}/GL/wglext.h ) + ${INCLUDE_DIR}/GL/gl_format.h ) + +# These can be dropped by some subsetted source distributions since +# they ought to exist, if required, in your OpenGL SDK package. +foreach(FN ${INCLUDE_DIR}/GL/glext.h ${INCLUDE_DIR}/GL/wglext.h) + if(EXISTS "${FN}") + list(APPEND GL_HEADERS "${FN}") + endif() +endforeach() + set( UTILS_HEADERS ${INCLUDE_DIR}/utils/algebra.h ${INCLUDE_DIR}/utils/sysinfo.h