mirror of
https://github.com/fltk/fltk.git
synced 2026-02-06 08:21:40 +08:00
Fi: Building with FLTK_BUILD_GL=0 fails on systems without opengl installed (#1151)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user