Skip to content

Commit

Permalink
Update 'RapidJSON' package to v1.1.0-ce81bc9-p0 (cpp-pm#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbsheth authored Aug 27, 2020
1 parent 0871c73 commit a1f0a2e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ hunter_default_version(QtCMakeExtra VERSION 1.0.34)
hunter_default_version(QtPropertyEditor VERSION 2.1.3-p0)
hunter_default_version(QtQmlManager VERSION 1.0.0)
hunter_default_version(Qwt VERSION 6.1-p3)
hunter_default_version(RapidJSON VERSION 1.1.0-66eb606-p0)
hunter_default_version(RapidJSON VERSION 1.1.0-ce81bc9-p0)
hunter_default_version(RapidXML VERSION 1.13)
hunter_default_version(RedisClient VERSION 0.6.1-p1)
hunter_default_version(SDL2 VERSION 2.0.7-p3)
Expand Down
16 changes: 16 additions & 0 deletions cmake/projects/RapidJSON/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ include(hunter_cmake_args)
include(hunter_download)
include(hunter_pick_scheme)

hunter_add_version(
PACKAGE_NAME
RapidJSON
VERSION
"1.1.0-ce81bc9-p0"
URL
"https://github.com/cpp-pm/rapidjson/archive/v1.1.0-ce81bc9-p0.tar.gz"
SHA1
95b85cd29fea30d4cbd1478bcc24a06ff60b79f8
)

hunter_add_version(
PACKAGE_NAME
RapidJSON
Expand Down Expand Up @@ -97,12 +108,17 @@ hunter_add_version(
3cae7f5043e2bfbeb83c033b90a1a9fb69fd2371
)

# C++ versions should be passed in by the toolchain.
# Since this is a header-only library, the RAPIDJSON_BUILD_CXX11 setting is irrelevant.
hunter_cmake_args(
RapidJSON
CMAKE_ARGS
RAPIDJSON_BUILD_DOC=OFF
RAPIDJSON_BUILD_EXAMPLES=OFF
RAPIDJSON_BUILD_TESTS=OFF
RAPIDJSON_BUILD_CXX11=OFF
RAPIDJSON_HAS_STDSTRING=ON
RAPIDJSON_NOMEMBERITERATORCLASS=ON
)

hunter_pick_scheme(DEFAULT url_sha1_cmake)
Expand Down
18 changes: 18 additions & 0 deletions docs/packages/pkg/RapidJSON.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,21 @@ RapidJSON
hunter_add_package(RapidJSON)
find_package(RapidJSON CONFIG REQUIRED)
target_link_libraries(... RapidJSON::rapidjson)
Macros
------

RapidJSON defines a few macros to configure the library. If different libraries use different
settings, undefined behavior can occur. We set up the defines to be exported when set, and we
set the ``RAPIDJSON_HAS_STDSTRING=1`` and ``RAPIDJSON_NOMEMBERITERATORCLASS`` by default. These
can be overridden with a `custom config <https://github.com/cpp-pm/gate#usage-custom-config>`__

.. code-block:: cmake
hunter_config(
RapidJSON
VERSION ${HUNTER_RapidJSON_VERSION}
CMAKE_ARGS
RAPIDJSON_HAS_STDSTRING=OFF
RAPIDJSON_NOMEMBERITERATORCLASS=OFF
)

0 comments on commit a1f0a2e

Please sign in to comment.