Closed Guillaume227 closed 6 months ago
update: after running
sudo apt install libglfw3-dev
as the useful error message suggests, cmake step succeeds and I see:
-- HelloImGui: using HELLOIMGUI_USE_GLFW_OPENGL3 as default default backend (glfw was found via find_package(glfw3))
But I am still curious why I had to do update anything in my environment following that hello_imgui
version pull.
Hello,
Sorry for the inconvenience. This originates from a discussion with a Linux distribution maintainer who criticized the fact that HelloImGui could download and build Glfw and/or Sdl when the tradition on Linux is to use shared libraries everywhere.
It is still possible to get the old behaviour, but on Linux this is an opt-in:
#------------------------------------------------------------------------------
# Automatic download of Glfw3 and SDL2 (provided as a convenience)
# (disabled by default on Linux, which prefers to use the system libraries,
# enabled by default on other platforms)
# Note: SDL and Glfw3 will be downloaded if:
# - HELLOIMGUI_DOWNLOAD_GLFW_IF_NEEDED or HELLOIMGUI_DOWNLOAD_SDL_IF_NEEDED is ON
# - HELLOIMGUI_USE_SDL_XXXX or HELLOIMGUI_USE_GLFW_XXXX is ON
# - find_package(glfw3 or SDL2) fails. If a system library is found, or a user library provided
# in a path added to CMAKE_PREFIX_PATH, it will be used instead
# - In the case of Glfw3, if a target named glfw is already defined, it will be used instead
#------------------------------------------------------------------------------
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(autodownload_default OFF)
else()
set(autodownload_default ON)
endif()
option(HELLOIMGUI_DOWNLOAD_GLFW_IF_NEEDED "Download and build GLFW if needed" ${autodownload_default})
option(HELLOIMGUI_DOWNLOAD_SDL_IF_NEEDED "Download and build GLFW if needed" ${autodownload_default})
Happy new year!
Thanks for the explanation and happy new year to you!!
I just pulled latest master and am facing the cmake error below. It was building fine just before the update without me having to specify any back-end explicitly. Is there anything to know about backend default change across the update?