Files
haikuports/dev-cpp/nlohmann_json/nlohmann_json-3.11.2.recipe
2023-11-19 16:44:38 +01:00

41 lines
970 B
Bash

SUMMARY="JSON for Modern C++"
DESCRIPTION="One-header JSON library with intuitive syntax."
HOMEPAGE="https://github.com/nlohmann/json"
COPYRIGHT="2013-2021 Niels Lohmann"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="http://github.com/nlohmann/json/archive/v$portVersion/json-$portVersion.tar.gz"
CHECKSUM_SHA256="d69f9deb6a75e2580465c6c4c5111b89c4dc2fa94e3a85fcd2ffcd9a143d9273"
SOURCE_FILENAME="nlohmann-json.v$portVersion.tar.gz"
SOURCE_DIR="json-$portVersion"
ARCHITECTURES="any"
PROVIDES="
nlohmann_json = $portVersion
devel:nlohmann_json = $portVersion
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:make
"
BUILD()
{
sed -i -e "s|:include>|:${relativeIncludeDir}>|" \
-e "s/CMAKE_INSTALL_LIBDIR/CMAKE_INSTALL_DATADIR/g" CMakeLists.txt
cmake -B build -S . $cmakeDirArgs \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=/bin/true \
-Wno-dev \
-DJSON_MultipleHeaders=ON \
-DJSON_BuildTests=OFF
make -C build $jobArgs
}
INSTALL()
{
make -C build install
}