Otok public index

apotocki/lz4

apotocki/lz4 1.10.0 (r1, windows)

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

Recipe files changed

Inputs

source.commitebb370ca83af193212df4dcbadcc5d87bc0de2f0
source.githttps://github.com/lz4/lz4
source.tagv1.10.0

Platforms

windows

Toolchains

Recipe files

build.lua 821 bytes · raw
-- The CMake project in build/cmake, the library only. What it installs: lz4.lib, or lz4.lib with lz4.dll.
function build(slice, options, deps)
    otok.cmake{
        source = slice.source .. "/build/cmake",
        defines = { BUILD_STATIC_LIBS = slice.linkage == "static", LZ4_BUILD_CLI = false, LZ4_BUILD_LEGACY_LZ4C = false },
    }
    local p = slice.prefix
    -- lz4file.h includes lz4frame_static.h, which the CMake project does not install
    otok.copy(slice.source .. "/lib/lz4frame_static.h", p .. "/include/lz4frame_static.h")
    local lib = otok.glob("lib/lz4*.lib", p)[1]
    local dll = otok.glob("bin/*lz4*.dll", p)[1]
    if dll then return { libraries = { lz4 = { link = lib, runtime = dll } }, headers = p .. "/include" } end
    return { libraries = { lz4 = lib }, headers = p .. "/include" }
end
recipe.toml 856 bytes · raw
# The otok recipe of LZ4 (https://github.com/apotocki/otok): lz4 for Windows, from the release tag, with MSVC or
# with clang-cl across from Linux; static or dynamic.
[recipe]
api = 1
library = "lz4"
name = "lz4"
version = "1.10.0"
revision = 1
license = "BSD-2-Clause"
license-files = ["lib/LICENSE"]
homepage = "https://lz4.org"
description = "LZ4, an extremely fast lossless compression library."
keywords = ["compression", "lz4"]
linkage = ["static", "dynamic"]

[source]
git = "https://github.com/lz4/lz4"
commit = "ebb370ca83af193212df4dcbadcc5d87bc0de2f0"
tag = "v1.10.0"

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

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

[[product]]
name = "LZ4"
libraries = ["lz4"]