hello_imgui icon indicating copy to clipboard operation
hello_imgui copied to clipboard

Offline usage: avoid re-downloading glfw and freetype

Open leavittx opened this issue 1 year ago • 3 comments

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

leavittx avatar Apr 16 '24 05:04 leavittx

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.

pthom avatar Apr 17 '24 08:04 pthom

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

leavittx avatar May 05 '24 07:05 leavittx

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

maybe you can: vcpkg install unofficial-lunasvg

find_package(unofficial-lunasvg CONFIG REQUIRED)

sAkuraOfficial avatar Jul 11 '24 16:07 sAkuraOfficial