56
56
----
57
57
58
58
<.> Shallow clones the fmt repository.
59
- <.> Configure the fmt library with CMake, exclusing the documentation and tests.
59
+ <.> Configure the fmt library with CMake, excluding the documentation and tests.
60
60
<.> Builds the fmt library in the `build` directory.
61
61
<.> Installs the fmt library in the `install` directory.
62
62
@@ -80,7 +80,7 @@ Windows PowerShell::
80
80
git clone https://github.com/microsoft/vcpkg.git -b master <.>
81
81
cd vcpkg
82
82
bootstrap-vcpkg.bat <.>
83
- vcpkg.exe fmt --triplet x64-windows <.>
83
+ vcpkg.exe install fmt --triplet x64-windows <.>
84
84
----
85
85
86
86
<.> Clones the Vcpkg repository.
@@ -96,7 +96,7 @@ Unix Variants::
96
96
git clone https://github.com/microsoft/vcpkg.git -b master <.>
97
97
cd vcpkg
98
98
./bootstrap-vcpkg.sh <.>
99
- ./vcpkg fmt <.>
99
+ ./vcpkg install fmt <.>
100
100
----
101
101
102
102
<.> Clones the Vcpkg repository.
@@ -217,7 +217,7 @@ Windows PowerShell::
217
217
[source,bash]
218
218
----
219
219
cd vcpkg
220
- vcpkg.exe duktape --triplet x64-windows <.>
220
+ vcpkg.exe install duktape --triplet x64-windows <.>
221
221
----
222
222
223
223
<.> Installs the `duktape` library.
@@ -229,7 +229,7 @@ Unix Variants::
229
229
[source,bash]
230
230
----
231
231
cd vcpkg
232
- ./vcpkg duktape <.>
232
+ ./vcpkg install duktape <.>
233
233
----
234
234
235
235
<.> Installs the `duktape` library.
@@ -238,6 +238,60 @@ cd vcpkg
238
238
239
239
NOTE: These examples assume VcPkg is already installed in the `third-party/vcpkg` directory (see the <<install-fmt>> section).
240
240
241
+ === Libxml2
242
+
243
+ MrDocs uses `libxml2` tools for tests.
244
+ Only developers need to install this dependency.
245
+ Users can skip this step.
246
+
247
+ From the `third-party` directory, you can clone the `libxml2` repository and install it with the following commands:
248
+
249
+ [source,bash]
250
+ ----
251
+ git clone https://github.com/GNOME/libxml2 --branch v2.12.6 --depth 1 <.>
252
+ cd libxml2
253
+ cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release -DLIBXML2_WITH_PROGRAMS=ON -DLIBXML2_WITH_FTP=OFF -DLIBXML2_WITH_HTTP=OFF -DLIBXML2_WITH_ICONV=OFF -DLIBXML2_WITH_LEGACY=OFF -DLIBXML2_WITH_LZMA=OFF -DLIBXML2_WITH_ZLIB=OFF -DLIBXML2_WITH_ICU=OFF -DLIBXML2_WITH_TESTS=OFF -DLIBXML2_WITH_HTML=ON -DLIBXML2_WITH_C14N=ON -DLIBXML2_WITH_CATALOG=ON -DLIBXML2_WITH_DEBUG=ON -DLIBXML2_WITH_ISO8859X=ON -DLIBXML2_WITH_MEM_DEBUG=OFF -DLIBXML2_WITH_MODULES=ON -DLIBXML2_WITH_OUTPUT=ON -DLIBXML2_WITH_PATTERN=ON -DLIBXML2_WITH_PUSH=ON -DLIBXML2_WITH_PYTHON=OFF -DLIBXML2_WITH_READER=ON -DLIBXML2_WITH_REGEXPS=ON -DLIBXML2_WITH_SAX1=ON -DLIBXML2_WITH_SCHEMAS=ON -DLIBXML2_WITH_SCHEMATRON=ON -DLIBXML2_WITH_THREADS=ON -DLIBXML2_WITH_THREAD_ALLOC=OFF -DLIBXML2_WITH_TREE=ON -DLIBXML2_WITH_VALID=ON -DLIBXML2_WITH_WRITER=ON -DLIBXML2_WITH_XINCLUDE=ON -DLIBXML2_WITH_XPATH=ON -DLIBXML2_WITH_XPTR=ON <.>
254
+ cmake --build ./build --config Release <.>
255
+ cmake --install ./build --prefix ./install <.>
256
+ cd ..
257
+ ----
258
+
259
+ <.> Shallow clones the libxml2 repository.
260
+ <.> Configure the libxml2 with CMake, excluding the documentation, tests, and unwanted dependencies.
261
+ <.> Builds libxml2 in the `build` directory.
262
+ <.> Installs libxml2 in the `install` directory.
263
+
264
+ If you prefer using Vcpkg to install dependencies, you can install `libxml2` with the following commands from the `third-party` directory:
265
+
266
+ [tabs]
267
+ ====
268
+ Windows PowerShell::
269
+ +
270
+ --
271
+ [source,bash]
272
+ ----
273
+ cd vcpkg
274
+ vcpkg.exe install libxml2[tools] --triplet x64-windows <.>
275
+ ----
276
+
277
+ <.> Installs `libxml2`.
278
+ --
279
+
280
+ Unix Variants::
281
+ +
282
+ --
283
+ [source,bash]
284
+ ----
285
+ cd vcpkg
286
+ ./vcpkg install libxml2[tools] <.>
287
+ ----
288
+
289
+ <.> Installs `libxml2`.
290
+ --
291
+ ====
292
+
293
+ NOTE: These examples assume VcPkg is already installed in the `third-party/vcpkg` directory (see the <<install-fmt>> section).
294
+
241
295
=== LLVM
242
296
243
297
MrDocs uses LLVM to parse C++ code and extract documentation from it.
@@ -333,33 +387,6 @@ Return from `./third-party/llvm-project/llvm` to the parent directory to build a
333
387
cd ../../..
334
388
----
335
389
336
- === Libxml2
337
-
338
- Developers should also install the `libxml2` tools to parse XML files.
339
- This tool is used in tests.
340
- You can install the libxml2 tools with Vcpkg:
341
-
342
- [tabs]
343
- ====
344
- Windows PowerShell::
345
- +
346
- --
347
- [source,bash]
348
- ----
349
- vcpkg.exe libxml2[tools] --triplet x64-windows
350
- ----
351
- --
352
-
353
- Unix Variants::
354
- +
355
- --
356
- [source,bash]
357
- ----
358
- ./vcpkg libxml2[tools]
359
- ----
360
- --
361
- ====
362
-
363
390
=== MrDocs
364
391
365
392
Return from `./third-party/vcpkg` to the parent directory of `third-party` (the one containing the `mrdocs` directory) to build and install MrDocs:
0 commit comments