summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2021-04-22 12:34:20 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2021-04-22 12:34:49 +0200
commit7b70d2c90dd4cab9189942e26445203257c80fe7 (patch)
tree59005022a06e6f0d80558dc1254c67cd2479ea78
parentd01aab2ecec3c437300c292536ffa0e91e494d0f (diff)
Fix handle_events demo build w/o OpenGL
test/handle_events.cxx can optionally be built with an Fl_Gl_Window, but this doesn't work if OpenGL support (libfltk_gl) is disabled.
-rw-r--r--test/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 5128e08db..7341de886 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -77,7 +77,11 @@ CREATE_EXAMPLE (file_chooser file_chooser.cxx "fltk_images;fltk")
CREATE_EXAMPLE (fltk-versions fltk-versions.cxx fltk)
CREATE_EXAMPLE (fonts fonts.cxx fltk)
CREATE_EXAMPLE (forms forms.cxx "fltk_forms;fltk")
-CREATE_EXAMPLE (handle_events handle_events.cxx "fltk_gl;fltk") # opt. Fl_Gl_Window
+if (OPENGL_FOUND)
+ CREATE_EXAMPLE (handle_events handle_events.cxx "fltk_gl;fltk") # opt. Fl_Gl_Window
+else()
+ CREATE_EXAMPLE (handle_events handle_events.cxx fltk) # w/o Fl_Gl_Window
+endif()
CREATE_EXAMPLE (hello hello.cxx fltk)
CREATE_EXAMPLE (help_dialog help_dialog.cxx "fltk_images;fltk")
CREATE_EXAMPLE (icon icon.cxx fltk)