-
-
Notifications
You must be signed in to change notification settings - Fork 148
Description
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.
- 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
- Same as with
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.