diff --git a/ports/nlohmann-json/portfile.cmake b/ports/nlohmann-json/portfile.cmake index 19343c4261..81e434b0d4 100644 --- a/ports/nlohmann-json/portfile.cmake +++ b/ports/nlohmann-json/portfile.cmake @@ -10,9 +10,14 @@ if(NOT DEFINED nlohmann-json_IMPLICIT_CONVERSIONS) set(nlohmann-json_IMPLICIT_CONVERSIONS ON) endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS +FEATURES + "diagnostics" JSON_Diagnostics +) + vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${FEATURE_OPTIONS} -DJSON_Install=ON -DJSON_MultipleHeaders=ON -DJSON_BuildTests=OFF @@ -27,7 +32,7 @@ vcpkg_replace_string( "{_IMPORT_PREFIX}/nlohmann_json.natvis" "{_IMPORT_PREFIX}/share/nlohmann_json/nlohmann_json.natvis" ) -if(EXISTS ${CURRENT_PACKAGES_DIR}/nlohmann_json.natvis) +if(EXISTS "${CURRENT_PACKAGES_DIR}/nlohmann_json.natvis") file(RENAME "${CURRENT_PACKAGES_DIR}/nlohmann_json.natvis" "${CURRENT_PACKAGES_DIR}/share/nlohmann_json/nlohmann_json.natvis" diff --git a/ports/nlohmann-json/vcpkg.json b/ports/nlohmann-json/vcpkg.json index bccb3d74bc..ac382db2fc 100644 --- a/ports/nlohmann-json/vcpkg.json +++ b/ports/nlohmann-json/vcpkg.json @@ -1,9 +1,10 @@ { "name": "nlohmann-json", "version-semver": "3.10.5", - "port-version": 2, + "port-version": 3, "description": "JSON for Modern C++", "homepage": "https://github.com/nlohmann/json", + "license": "MIT", "dependencies": [ { "name": "vcpkg-cmake", @@ -13,5 +14,10 @@ "name": "vcpkg-cmake-config", "host": true } - ] + ], + "features": { + "diagnostics": { + "description": "Build json_diagnostics" + } + } } diff --git a/versions/baseline.json b/versions/baseline.json index c045b6928c..f882081357 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4862,7 +4862,7 @@ }, "nlohmann-json": { "baseline": "3.10.5", - "port-version": 2 + "port-version": 3 }, "nlopt": { "baseline": "2.7.1", diff --git a/versions/n-/nlohmann-json.json b/versions/n-/nlohmann-json.json index 2b6fa1d436..b476b41881 100644 --- a/versions/n-/nlohmann-json.json +++ b/versions/n-/nlohmann-json.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "91f188e19b106e7d316de593e98f3319f8f5ec25", + "version-semver": "3.10.5", + "port-version": 3 + }, { "git-tree": "becf6a86f7e28342840fc807840c68b133c6fad8", "version-semver": "3.10.5",