aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/json-schema-validator
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/json-schema-validator
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/json-schema-validator')
-rw-r--r--vcpkg/ports/json-schema-validator/portfile.cmake34
-rw-r--r--vcpkg/ports/json-schema-validator/vcpkg.json22
2 files changed, 56 insertions, 0 deletions
diff --git a/vcpkg/ports/json-schema-validator/portfile.cmake b/vcpkg/ports/json-schema-validator/portfile.cmake
new file mode 100644
index 0000000..7f7e145
--- /dev/null
+++ b/vcpkg/ports/json-schema-validator/portfile.cmake
@@ -0,0 +1,34 @@
+vcpkg_download_distfile(PATCH_JSON_SCHEMA_VALIDATOR_PR_315
+ URLS https://github.com/pboettch/json-schema-validator/commit/0034c113477f83c28d4380de1ee189c25b1168e6.patch
+ SHA512 5c165b50813b0d9937ff0eb4d4a81e2d1e77718ac3b0d02b93931c8eddb4e06e4fae1822c5cc97a5b01c995916a29d0af03fcbcd8f059cb29cfeb0e2371b15e3
+ FILENAME 0034c113477f83c28d4380de1ee189c25b1168e6.patch
+)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO pboettch/json-schema-validator
+ REF "${VERSION}"
+ SHA512 6d207031acdb94c44f96ff6346dccaf98f2c9d3619d71e419ddabff548ea34d50e8eb103622c99ae28ecb7fddedd687b297e5ad934aa0106c58ac59fc4d65ea9
+ HEAD_REF master
+ PATCHES
+ "${PATCH_JSON_SCHEMA_VALIDATOR_PR_315}"
+)
+
+string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" BUILD_SHARED_LIBS)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DJSON_VALIDATOR_INSTALL=ON
+ -DJSON_VALIDATOR_BUILD_TESTS=OFF
+ -DJSON_VALIDATOR_BUILD_EXAMPLES=OFF
+ -DJSON_VALIDATOR_SHARED_LIBS=${BUILD_SHARED_LIBS}
+)
+
+vcpkg_cmake_install()
+vcpkg_copy_pdbs()
+
+vcpkg_cmake_config_fixup(PACKAGE_NAME "nlohmann_json_schema_validator" CONFIG_PATH "lib/cmake/nlohmann_json_schema_validator")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/json-schema-validator/vcpkg.json b/vcpkg/ports/json-schema-validator/vcpkg.json
new file mode 100644
index 0000000..898c8e9
--- /dev/null
+++ b/vcpkg/ports/json-schema-validator/vcpkg.json
@@ -0,0 +1,22 @@
+{
+ "name": "json-schema-validator",
+ "version": "2.3.0",
+ "port-version": 2,
+ "description": "C++ library for validating JSON documents based on a JSON Schema. This validator is based on the nlohmann-json library.",
+ "homepage": "https://github.com/pboettch/json-schema-validator",
+ "license": "MIT",
+ "dependencies": [
+ {
+ "name": "nlohmann-json",
+ "default-features": false
+ },
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}