New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add RapidJSON recipe #2192
Add RapidJSON recipe #2192
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
set RAPIDJSON_DIR=%SRC_DIR% | ||
|
||
REM Copy headers | ||
xcopy /S %RAPIDJSON_DIR%\include %LIBRARY_INC% | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is already the default value for |
||
-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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure you can run |
||
make install |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't the build number start at 0? |
||
|
||
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] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we add a test for the presence of the The RapidJSONcmake install places these files in directory which is |
||
|
||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would you be OK adding me and @JohanMabille as maintainers of the recipe? We were just about to propose a recipe for this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to use the
make install
approach on windows too? The benefit is that it will place therapidjsonConfig.cmake
andrapidjsonConfigVersion.cmake
files in the right configuration folder for cmake under the prefix, allowing cmake to find it when building packages that depend upon rapidjson.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(We can confirm that the
make install
works on windows forrapidJSON
.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit outside my expertise -- can you propose a new recipe (feel free to start from this one if you'd like) with the Windows fixes? I am happy to be on the maintainer list