You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently a change was made to the cmake script that downloads the latest version of plutosvg automatically while running cmake.
While this is of course very convenient, it makes the library basically impossible to use when building an application that should be put on various distro's package repositories. For example, the Flatpak and Fedora package builders don't have access to the internet anymore after the initial source code packages have been cloned/downloaded. So at the configure step when your cmake script runs, FetchContent fails because there's no internet available anymore.
To fix this, there's a few options.
Have plutosvg as a submodule again
This is the easiest way but many distros prefer also using their own plutosvg package
Use find_package(plutosvg REQUIRED) instead
This requires developers to manually install plutosvg from the package manager or build it themselves
Add options to point lunasvg to the include and library files of plutosvg and have it use them then instead.
Same as with find_package, just more work for the developer
Personally, I always provide a mix of the first two. Include and use the submodule by default but provide a CMake option to switch over to using find_package when desired. What do you think?
Right now I'm using a fork of lunasvg for my project that has commit b1eb778 reverted. This solves the issue for me but it's of course not a nice solution.
The text was updated successfully, but these errors were encountered:
I understand that FetchContent can fail without internet access, though I thought it was a more modern approach for handling dependencies. I wasn't aware that it doesn't work properly on some machines, so that's definitely something I'll need to look into.
A pull request with a fix would be highly appreciated!
Hey!
Recently a change was made to the cmake script that downloads the latest version of plutosvg automatically while running cmake.
While this is of course very convenient, it makes the library basically impossible to use when building an application that should be put on various distro's package repositories. For example, the Flatpak and Fedora package builders don't have access to the internet anymore after the initial source code packages have been cloned/downloaded. So at the configure step when your cmake script runs,
FetchContent
fails because there's no internet available anymore.To fix this, there's a few options.
find_package(plutosvg REQUIRED)
insteadfind_package
, just more work for the developerPersonally, I always provide a mix of the first two. Include and use the submodule by default but provide a CMake option to switch over to using
find_package
when desired. What do you think?Right now I'm using a fork of lunasvg for my project that has commit b1eb778 reverted. This solves the issue for me but it's of course not a nice solution.
The text was updated successfully, but these errors were encountered: