From 80b1a7e306b192559e0d1cd8e697d664ad44bca0 Mon Sep 17 00:00:00 2001 From: kestred Date: Thu, 30 Jan 2014 04:39:10 -0700 Subject: [PATCH] Add header to CMake panda/metalibs/pandagl that causes an error when it is being built without proper support. --- panda/metalibs/pandagl/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/panda/metalibs/pandagl/CMakeLists.txt b/panda/metalibs/pandagl/CMakeLists.txt index 9d321ef16f..96eb7465cc 100644 --- a/panda/metalibs/pandagl/CMakeLists.txt +++ b/panda/metalibs/pandagl/CMakeLists.txt @@ -1,4 +1,12 @@ if(HAVE_GL) + # Check that we actually have a display subsystem. + if(NOT HAVE_WGL AND NOT HAVE_COCOA AND NOT HAVE_CARBON AND NOT HAVE_GLX) + message("") # Add extra line before error + message(SEND_ERROR + "When compiling with OpenGL (HAVE_GL), at least one of: + HAVE_WGL, HAVE_COCOA, HAVE_CARBON, or HAVE_GLX must be defined.") + endif() + add_definitions(-DBUILDING_PANDAGL) set(PANDAGL_LINK_TARGETS p3glgsg)