sammycage / lunasvg

lunasvg is a standalone SVG rendering library in C++
MIT License
818 stars 115 forks source link

[lunasvg] Add cmake usage #132

Open JonLiu1993 opened 1 year ago

JonLiu1993 commented 1 year ago

Related issue https://github.com/microsoft/vcpkg/pull/30196, unasvg does not export anything after installation, Add usage for port lunasvg. Tested the usage via vcpkg successfully by lunasvg:x64-windows:

lunasvg provides CMake targets:

    # this is heuristically generated, and may not be correct
    find_package(unofficial-lunasvg CONFIG REQUIRED)
    target_link_libraries(main PRIVATE unofficial::lunasvg::lunasvg)
adamkewley commented 11 months ago

I'm encountering a similar problem when building lunasvg via ExternalProject_Add for my project. Usage point here:

The way I am getting around it is to use a custom fork (this) with the changeset described in #138 applied to it.

The changeset here is probably more comprehensive than #138, because it includes describing the installation layout (whereas I'm assuming that the cmake default is going to be ok for downstream consumers)

:+1: for writing this up - it's good to see alternate solutions to similar problems