Otok public index

apotocki/lunasvg

apotocki/lunasvg 3.5.0 (r1, windows)

Library
lunasvg
Variant
windows, target windows
Channel
stable
Published
2026-11-07
Recipe source
https://github.com/otok-dev/recipes.git
32756a87cf5bd189ca4c9825159bf0713ea8cf5e in recipes/lunasvg/3.5/windows/
Recipe SHA-256
e7bd6447831fbe6aa6b00abe2722098fb1c1cb5f61a124e1662e8f94b9aa2f07

Recipe files changed

Inputs

source.commit83c58df8103dc7dca423dfd824992af94d49bed6
source.githttps://github.com/sammycage/lunasvg
source.tagv3.5.0

Platforms

windows

Dependencies

LibraryVersionRecipeDetails
plutovg >= 1.3 apotocki/plutovg

Toolchains

Recipe files

build.lua 1190 bytes · raw
-- LunaSVG's CMake project without its examples, with the plutovg of the dependency: CMake fails rather
-- than build the copy in the tree. What it installs: lunasvg.lib, or lunasvg.lib with
-- lunasvg.dll; the header in include/lunasvg/.
function build(slice, options, deps)
    otok.cmake{ defines = { USE_SYSTEM_PLUTOVG = true, CMAKE_REQUIRE_FIND_PACKAGE_plutovg = true, LUNASVG_BUILD_EXAMPLES = false } }
    local p = slice.prefix
    -- a static library is told by LUNASVG_BUILD_STATIC, which its CMake config gives its consumers: the
    -- header says so itself, as the others have no config
    if slice.linkage == "static" then
        local header = p .. "/include/lunasvg/lunasvg.h"
        local text, n = otok.read(header):gsub("defined%(LUNASVG_BUILD_STATIC%)", "1")
        assert(n > 0, "lunasvg.h no longer tests LUNASVG_BUILD_STATIC")
        otok.write(header, text)
    end
    local lib = otok.glob("lib/lunasvg*.lib", p)[1]
    local dll = otok.glob("bin/*lunasvg*.dll", p)[1]
    if dll then return { libraries = { lunasvg = { link = lib, runtime = dll } }, headers = p .. "/include" } end
    return { libraries = { lunasvg = lib }, headers = p .. "/include" }
end
recipe.toml 1080 bytes · raw
# The otok recipe of LunaSVG (https://github.com/apotocki/otok): lunasvg for Windows, from the release tag, with MSVC
# or with clang-cl across from Linux, with PlutoVG of its own recipe instead of the copy in its tree; static or dynamic.
[recipe]
api = 1
library = "lunasvg"
name = "lunasvg"
version = "3.5.0"
revision = 1
license = "MIT"
license-files = ["LICENSE"]
homepage = "https://github.com/sammycage/lunasvg"
description = "LunaSVG, an SVG rendering library in C++."
keywords = ["svg", "graphics", "rendering"]
linkage = ["static", "dynamic"]
cxx-standard = ">= 17"

[source]
git = "https://github.com/sammycage/lunasvg"
commit = "83c58df8103dc7dca423dfd824992af94d49bed6"
tag = "v3.5.0"

[platforms]
supported = ["windows"]
build-on = ["windows/msvc", "linux/clang-cl"]

[deps.plutovg]
version = ">= 1.3"
default-recipe = "apotocki/plutovg"

[toolchains]
cmake = { version = ">= 3.20", default-recipe = "apotocki/cmake" }
ninja = { version = ">= 1.10", default-recipe = "apotocki/ninja" }

[[product]]
name = "LunaSVG"
libraries = ["lunasvg"]
link = { runtime = "c++" }