makedepends=(cmake)

description="JSON for Modern C++"
url="https://github.com/nlohmann/json"

packager="Great-OS Team"
maintainer="Great-OS Team"

name="nlohmann-json"
version="3.12.0"
release=1

PKGMK_KEEP_SOURCES="no"
source=(https://github.com/nlohmann/json/archive/refs/tags/v${version}.tar.gz)

build() { 
  cmake -B build \
        -DBUILD_TESTING=OFF \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_INSTALL_LIBDIR=/usr/lib \
        -DJSON_BuildTests=OFF \
        -DJSON_MultipleHeaders=ON \
        -S json-$version -W no-dev

  cmake --build build --verbose

  DESTDIR="$PKG" cmake --install build
}
