pthom / hello_imgui

Hello, Dear ImGui: unleash your creativity in app development and prototyping
https://pthom.github.io/hello_imgui
MIT License
604 stars 91 forks source link

Offline usage: avoid re-downloading glfw and freetype #105

Open leavittx opened 2 months ago

leavittx commented 2 months ago

Hi! Sometimes I need to re-generate cmake cache when not connected to the internet. For example that happens all the time when I switch from Debug to Release configuration and vice versa in Visual Studio. Hello imgui tends to download freetype and glfw each time. Would it be possible to cache those locally (maybe as a cmake configure time option)? Also because of that the build time grows significally when you add new source files for example

pthom commented 2 months ago

Hello,

Hello ImGui will try to find glfw and freetype via find_package. If it cannot find them, it will try to download them.

I would advise you to install them for example via vcpkg once for all; Thus the download will be skipped.

leavittx commented 1 month ago

I was able to get it working with vcpkg following https://github.com/microsoft/vcpkg?tab=readme-ov-file#quick-start-windows and partly https://learn.microsoft.com/en-gb/vcpkg/get_started/get-started?pivots=shell-cmd (the vcpkg add port <packages> command) However I had to install lunaswg separately, otherwise the lunasvg.h header wasn't found in imgui_freetype.cpp. Final install command for the project: vcpkg add port freetype glfw3 lunasvg