@@ -43,19 +43,62 @@ into 0.y.z.
4343### The vcpkg dependency manager
4444
4545You can download and install JsonCpp using the [ vcpkg] ( https://github.com/Microsoft/vcpkg/ )
46- dependency manager:
46+ dependency manager, which has installation instruction dependent on your
47+ build system. For example, if you are in a CMake project, the
48+ [ CMake install tutorial] ( https://learn.microsoft.com/en-us/vcpkg/get_started/get-started?pivots=shell-powershell )
49+ suggests the follow installation method.
50+
51+ First, clone and set up ` vcpkg ` .
4752
4853``` sh
4954 git clone https://github.com/Microsoft/vcpkg.git
5055 cd vcpkg
5156 ./bootstrap-vcpkg.sh
52- ./vcpkg integrate install
53- ./vcpkg install jsoncpp
5457```
5558
56- The JsonCpp port in vcpkg is kept up to date by Microsoft team members and
57- community contributors. If the version is out of date, please [ create an issue or pull request] ( https://github.com/Microsoft/vcpkg )
58- on the vcpkg repository.
59+ Then, create a [ vcpkg.json manifest] ( https://learn.microsoft.com/en-us/vcpkg/reference/vcpkg-json ) ,
60+ enabling manifest mode and adding JsonCpp to the manifest's dependencies list.
61+
62+ ``` sh
63+ vcpkg new --application
64+ vcpkg add port jsoncpp
65+ ```
66+
67+ > [ !NOTE] : you can use vcpkg in either classic mode or manifest mode (recommended).
68+
69+ #### Classic mode
70+
71+ If your project does not have a ` vcpkg.json ` ,
72+ your project is in [ Classic mode] ( https://learn.microsoft.com/en-us/vcpkg/concepts/classic-mode )
73+ you can install JsonCpp by directly invoking the ` install ` command:
74+
75+ ``` sh
76+ vcpkg install jsoncpp
77+ ```
78+
79+ ### Manifest mode
80+
81+ If your project * does* have a vcpkg.json manifest, your project is in [ Manifest mode] ( https://learn.microsoft.com/en-us/vcpkg/concepts/manifest-mode )
82+ and you need to add JsonCpp to your package manifest dependencies, then invoke
83+ install with no arguments.
84+
85+ ``` sh
86+ vcpkg add port jsoncpp
87+ vcpkg install
88+ ```
89+
90+ Example manifest:
91+
92+ ``` sh
93+ {
94+ " name" : " best-app-ever" ,
95+ " dependencies" : [ " jsoncpp" ],
96+ }
97+ ```
98+
99+ > [ !NOTE] The JsonCpp port in vcpkg is kept up to date by Microsoft team members and community contributors.
100+ > If the version is out of date, please [ create an issue or pull request] ( https://github.com/Microsoft/vcpkg )
101+ > on the vcpkg repository.
59102
60103### Conan package manager
61104
0 commit comments