diff --git a/recipes/rapidjson/bld.bat b/recipes/rapidjson/bld.bat new file mode 100644 index 0000000000000..c874e5023ce28 --- /dev/null +++ b/recipes/rapidjson/bld.bat @@ -0,0 +1,4 @@ +set RAPIDJSON_DIR=%SRC_DIR% + +REM Copy headers +xcopy /S %RAPIDJSON_DIR%\include %LIBRARY_INC% diff --git a/recipes/rapidjson/build.sh b/recipes/rapidjson/build.sh new file mode 100644 index 0000000000000..a6d4bf90ceef7 --- /dev/null +++ b/recipes/rapidjson/build.sh @@ -0,0 +1,20 @@ +#!/bin/env bash + +set -e + +mkdir build-dir +cd build-dir + +cmake -DRAPIDJSON_HAS_STDSTRING=ON \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DRAPIDJSON_BUILD_CXX11=ON \ + -DRAPIDJSON_BUILD_TESTS=OFF \ + -DRAPIDJSON_BUILD_EXAMPLES=OFF \ + -DRAPIDJSON_BUILD_DOC=OFF \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_BUILD_TYPE=release \ + .. + +make -j${CPU_COUNT} +ctest +make install diff --git a/recipes/rapidjson/meta.yaml b/recipes/rapidjson/meta.yaml new file mode 100644 index 0000000000000..5f47ecc5dd382 --- /dev/null +++ b/recipes/rapidjson/meta.yaml @@ -0,0 +1,34 @@ +{% set version = "1.1.0" %} + +package: + name: rapidjson + version: {{ version }} + +source: + url: https://github.com/miloyip/rapidjson/archive/v{{ version }}.tar.gz + fn: {{ version }}.tar.gz + md5: badd12c511e081fec6c89c43a7027bce + +build: + number: 1 + +requirements: + build: + - toolchain + - cmake + +test: + commands: + - test -e $PREFIX/include/rapidjson/rapidjson.h # [unix] + - if exist %LIBRARY_INC%\rapidjson\rapidjson.h (exit 0) else (exit 1) # [win] + +about: + home: https://github.com/miloyip/rapidjson + summary: A fast JSON parser/generator for C++ with both SAX/DOM style API + license: MIT + license_file: license.txt + license_family: MIT + +extra: + recipe-maintainers: + - wesm