diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-12-03 17:12:49 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-12-03 17:12:49 +0100 |
| commit | 167dba881733d8a8f43cfe047e1122512e5f878e (patch) | |
| tree | ad49270ef604be18d2e227d5f9cb467cb01efb08 /test | |
| parent | edd680395fd66ab0d4c57f4acf63856e9dfd0615 (diff) | |
Fi: Building with FLTK_BUILD_GL=0 fails on systems without opengl installed (#1151)
Diffstat (limited to 'test')
| -rw-r--r-- | test/CMakeLists.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a92d700a3..eff372154 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -245,11 +245,18 @@ if(CMAKE_CXX_COMPILER_ID IN_LIST _compilers) foreach(hd ${all_headers}) get_filename_component(hd "${hd}" NAME) # skip headers that must not be included directly and fl_config.h if it exists - string(REGEX MATCH "^(mac|win32|x11|wayland|fl_config)\.[hH]$" skip "${hd}") + string(REGEX MATCH "^(mac|win32|x11|wayland|fl_config|gl[a-z_0-9]*)\.[hH]$" skip "${hd}") if(skip STREQUAL "") file(APPEND ${include_all} "#include <FL/${hd}>\n") endif() endforeach() + if(FLTK_USE_GL) + file(GLOB all_headers "${FLTK_SOURCE_DIR}/FL/gl*.[hH]") + foreach(hd ${all_headers}) + get_filename_component(hd "${hd}" NAME) + file(APPEND ${include_all} "#include <FL/${hd}>\n") + endforeach() + endif(FLTK_USE_GL) file(APPEND ${include_all} "/* End of generated file */\n") # now add the 'shadow_variables' target and set the compiler flag |
