Skip to content

Commit

Permalink
cmake: add option HELLOIMGUI_DOWNLOAD_THIRD (OFF under Linux)
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Dec 15, 2023
1 parent b2f6546 commit 9dc448e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@ if(MACOSX)
option(HELLOIMGUI_MACOS_NO_BUNDLE "Under macOS, build regular terminal executables, not app bundles" OFF)
endif()

#------------------------------------------------------------------------------
# HELLOIMGUI_DOWNLOAD_THIRD: download third party libraries as part of the build
# This is the default, except under Linux, where it is expected that the libraries are installed system-wide
# When ON, the libraries that can be downloaded are SDL and Glfw. This is governed by the options
# HELLOIMGUI_WITH_GLFW and HELLOIMGUI_WITH_SDL, where HELLOIMGUI_WITH_GLFW is set to ON if no other
# options is selected (see below)
#------------------------------------------------------------------------------
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
option(HELLOIMGUI_DOWNLOAD_THIRD "Automatically download third party libraries during the build" OFF)
else()
option(HELLOIMGUI_DOWNLOAD_THIRD "Automatically download third party libraries during the build" ON)
endif()

#------------------------------------------------------------------------------
# Options / Backend selection
#------------------------------------------------------------------------------
Expand All @@ -61,6 +74,7 @@ if (NOT HELLOIMGUI_WITH_GLFW
AND NOT HELLOIMGUI_USE_GLFW_OPENGL3
AND NOT HELLOIMGUI_USE_QT
AND NOT EMSCRIPTEN
AND HELLOIMGUI_DOWNLOAD_THIRD
)
set(HELLOIMGUI_WITH_GLFW ON CACHE BOOL "")
message(WARNING "
Expand Down

0 comments on commit 9dc448e

Please sign in to comment.