Skip to content

Compiling application with lunasvg isn't possible in many distro package build systems #207

@WerWolv

Description

@WerWolv

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions