summaryrefslogtreecommitdiff
path: root/test/CubeView.h
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2024-11-29 16:19:22 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2024-11-29 16:19:22 +0100
commit12ea6a02880cb5ba0e20aba6d853cd642e0f0552 (patch)
treef78c00b210b4acb60b77de4626416ebb826bfd92 /test/CubeView.h
parent404411ea68e978bab159bd29dc85a02256144e7b (diff)
Enable building the CubeView demo w/o requiring '<config.h>'
This allows to build the CubeView demo from the unmodified FLTK sources w/o having to provide a 'config.h' file by defining HAVE_GL=1 on the compiler commandline. See also comment in test/CubeView.h. test/CubeMain.cxx: don't include <config.h> at all (not needed) test/CubeView.h: #include <config.h> only if HAVE_GL is not defined
Diffstat (limited to 'test/CubeView.h')
-rw-r--r--test/CubeView.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/CubeView.h b/test/CubeView.h
index 9568e93c9..3af64e306 100644
--- a/test/CubeView.h
+++ b/test/CubeView.h
@@ -1,7 +1,7 @@
//
// CubeView class definitions for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2021 by Bill Spitzak and others.
+// Copyright 1998-2024 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -17,7 +17,16 @@
#ifndef CUBEVIEW_H
#define CUBEVIEW_H 1
+// Note: The CubeView demo program can only be built if
+// (1) '<config.h>' can be included (FLTK build) *or*
+// (2) 'HAVE_GL' has been defined prior to including this header.
+
+// Define 'HAVE_GL=1' on the compiler commandline to build
+// this program w/o 'config.h' (needs FLTK lib with GL).
+
+#ifndef HAVE_GL
#include <config.h>
+#endif
// Note to editor: the following code can and should be copied
// to the fluid tutorial in 'documentation/src/fluid.dox'