Skip to content

Commit

Permalink
Merge pull request #294 from wravery/conditional-rapidjson-dependency
Browse files Browse the repository at this point in the history
Make the vcpkg rapidjson dependency conditional on a feature
  • Loading branch information
wravery authored Nov 17, 2023
2 parents 4b9e729 + a33a0cd commit 2dd4cc1
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 21 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ endif()
option(GRAPHQL_BUILD_SCHEMAGEN "Build the schemagen tool." ON)
option(GRAPHQL_BUILD_CLIENTGEN "Build the clientgen tool." ON)
option(GRAPHQL_BUILD_TESTS "Build the tests and sample schema library." ON)
option(GRAPHQL_USE_RAPIDJSON "Use RapidJSON for JSON serialization." ON)

if(GRAPHQL_BUILD_SCHEMAGEN)
list(APPEND VCPKG_MANIFEST_FEATURES "schemagen")
Expand All @@ -50,6 +51,10 @@ if(GRAPHQL_BUILD_TESTS)
list(APPEND VCPKG_MANIFEST_FEATURES "tests")
endif()

if(GRAPHQL_USE_RAPIDJSON)
list(APPEND VCPKG_MANIFEST_FEATURES "rapidjson")
endif()

if(GRAPHQL_BUILD_SCHEMAGEN AND GRAPHQL_BUILD_CLIENTGEN)
option(GRAPHQL_UPDATE_SAMPLES "Regenerate the sample schema sources whether or not we're building the tests." ON)

Expand Down
2 changes: 1 addition & 1 deletion cmake/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.5.4
4.5.5
4 changes: 2 additions & 2 deletions include/graphqlservice/internal/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

namespace graphql::internal {

constexpr std::string_view FullVersion { "4.5.4" };
constexpr std::string_view FullVersion { "4.5.5" };

constexpr size_t MajorVersion = 4;
constexpr size_t MinorVersion = 5;
constexpr size_t PatchVersion = 4;
constexpr size_t PatchVersion = 5;

} // namespace graphql::internal

Expand Down
4 changes: 2 additions & 2 deletions res/ClientGen.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <winver.h>

#define GRAPHQL_RC_VERSION 4,5,4,0
#define GRAPHQL_RC_VERSION_STR "4.5.4"
#define GRAPHQL_RC_VERSION 4,5,5,0
#define GRAPHQL_RC_VERSION_STR "4.5.5"

#ifndef DEBUG
#define VER_DEBUG 0
Expand Down
4 changes: 2 additions & 2 deletions res/SchemaGen.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <winver.h>

#define GRAPHQL_RC_VERSION 4,5,4,0
#define GRAPHQL_RC_VERSION_STR "4.5.4"
#define GRAPHQL_RC_VERSION 4,5,5,0
#define GRAPHQL_RC_VERSION_STR "4.5.5"

#ifndef DEBUG
#define VER_DEBUG 0
Expand Down
4 changes: 2 additions & 2 deletions res/graphqlclient_version.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <winver.h>

#define GRAPHQL_RC_VERSION 4,5,4,0
#define GRAPHQL_RC_VERSION_STR "4.5.4"
#define GRAPHQL_RC_VERSION 4,5,5,0
#define GRAPHQL_RC_VERSION_STR "4.5.5"

#ifndef DEBUG
#define VER_DEBUG 0
Expand Down
4 changes: 2 additions & 2 deletions res/graphqljson_version.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <winver.h>

#define GRAPHQL_RC_VERSION 4,5,4,0
#define GRAPHQL_RC_VERSION_STR "4.5.4"
#define GRAPHQL_RC_VERSION 4,5,5,0
#define GRAPHQL_RC_VERSION_STR "4.5.5"

#ifndef DEBUG
#define VER_DEBUG 0
Expand Down
4 changes: 2 additions & 2 deletions res/graphqlpeg_version.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <winver.h>

#define GRAPHQL_RC_VERSION 4,5,4,0
#define GRAPHQL_RC_VERSION_STR "4.5.4"
#define GRAPHQL_RC_VERSION 4,5,5,0
#define GRAPHQL_RC_VERSION_STR "4.5.5"

#ifndef DEBUG
#define VER_DEBUG 0
Expand Down
4 changes: 2 additions & 2 deletions res/graphqlresponse_version.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <winver.h>

#define GRAPHQL_RC_VERSION 4,5,4,0
#define GRAPHQL_RC_VERSION_STR "4.5.4"
#define GRAPHQL_RC_VERSION 4,5,5,0
#define GRAPHQL_RC_VERSION_STR "4.5.5"

#ifndef DEBUG
#define VER_DEBUG 0
Expand Down
4 changes: 2 additions & 2 deletions res/graphqlservice_version.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <winver.h>

#define GRAPHQL_RC_VERSION 4,5,4,0
#define GRAPHQL_RC_VERSION_STR "4.5.4"
#define GRAPHQL_RC_VERSION 4,5,5,0
#define GRAPHQL_RC_VERSION_STR "4.5.5"

#ifndef DEBUG
#define VER_DEBUG 0
Expand Down
2 changes: 0 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,6 @@ endif()
# You will also need to define how to build the graphqljson library target with your
# implementation, and you should set BUILD_GRAPHQLJSON so that the test dependencies know
# about your version of graphqljson.
option(GRAPHQL_USE_RAPIDJSON "Use RapidJSON for JSON serialization." ON)

if(GRAPHQL_USE_RAPIDJSON)
find_package(RapidJSON CONFIG REQUIRED)

Expand Down
9 changes: 7 additions & 2 deletions vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
"gtest"
]
},
"rapidjson": {
"description": "Build the graphqljson library with RapidJSON.",
"dependencies": [
"rapidjson"
]
},
"update-samples": {
"description": "Regenerate the sample schema sources whether or not we're building the tests.",
"dependencies": [
Expand All @@ -41,8 +47,7 @@
}
},
"dependencies": [
"pegtl",
"rapidjson"
"pegtl"
],
"builtin-baseline": "a618637937298060bdbe5fbcfb628eabd1082c8a"
}

0 comments on commit 2dd4cc1

Please sign in to comment.