Skip to content

Commit

Permalink
Fi: Building with FLTK_BUILD_GL=0 fails on systems without opengl ins…
Browse files Browse the repository at this point in the history
…talled (fltk#1151)
  • Loading branch information
ManoloFLTK committed Dec 3, 2024
1 parent edd6803 commit 167dba8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 167dba8

Please sign in to comment.