You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can also install `fmt` with Vcpkg in _Manifest mode_.
188
-
In https://learn.microsoft.com/en-us/vcpkg/users/manifests[manifest mode,windows=blank_], you declare your project's direct dependencies in a manifest file named `vcpkg.json`.
189
-
MrDocs includes a `vcpkg.json.example` file you can duplicate or create a symlink as `vcpkg.json` to use this mode.
190
-
This file includes all the dependencies MrDocs needs, except for LLVM.
191
-
192
-
In this mode, VcPkg will create separate installed trees for each project and configuration.
193
-
This is the recommended vcpkg mode for most users, according to the https://learn.microsoft.com/en-us/vcpkg/users/manifests[vcpkg documentation,window=blank_].
194
-
====
195
-
196
146
=== Duktape
197
147
198
148
MrDocs uses the `duktape` library for JavaScript parsing.
The scripts above download the `duktape` source code, extract it, and configure it with CMake.
296
246
The CMake scripts provided by MrDocs are copied to the `duktape-2.7.0` directory to facilitate the build process with CMake and provide CMake installation scripts for other projects.
297
247
298
-
If you prefer using Vcpkg to install dependencies, you can install `duktape` with the following commands from the `third-party` directory:
@@ -475,68 +363,26 @@ Return from `./third-party/llvm-project/llvm` to the LLVM project directory:
475
363
cd ../..
476
364
----
477
365
478
-
=== LibC++
479
-
480
-
In addition to LLVM, MrDocs requires a deterministic version of the C++ standard library (LibC++) to ensure consistent behavior across various environments.
481
-
This step is crucial for replicating specific compiler and library configurations.
482
-
483
-
**Download**:
484
-
485
-
Continue using the same LLVM project directory.
486
-
487
-
**Configure**:
366
+
=== MrDocs
488
367
489
-
Configure and build LibC++ using the existing structure:
368
+
Return to the parent directory of `third-party` (the one containing the `mrdocs` directory) to build and install MrDocs:
490
369
491
370
[source,bash]
492
371
----
493
-
export CXX="./install/bin/clang++"
494
-
export CC="./install/bin/clang"
372
+
cd ../..
495
373
----
496
374
497
-
These options set the C and pass:[C++] compilers to the ones previously installed by LLVM.
498
-
MrDocs only depends on the pass:[LibC++] headers, so any compiler that works for this step should be fine.
499
-
500
-
Run a command such as the following to configure LLVM:
The MrDocs repository also includes a `CMakePresets.json` file that contains the parameters to configure MrDocs with CMake.
614
-
615
-
To specify the installation directories, you can use the `LLVM_ROOT`, `DUKTAPE_SOURCE_ROOT`, `CMAKE_TOOLCHAIN_FILE` environment variables.
616
-
To specify a generator (`-G`) and platform name (`-A`), you can use the `CMAKE_GENERATOR` and `CMAKE_GENERATOR_PLATFORM` environment variables.
617
-
618
-
You can also customize the presets by duplicating and editing the `CMakeUserPresets.json.example` file in the `mrdocs` directory.
619
-
This is typically more convenient than using environment variables.
620
-
621
417
**Build**:
622
418
623
419
Then build and install MrDocs with:
@@ -635,7 +431,6 @@ To customize the C and C++ compilers, use the `CMAKE_C_COMPILER` and `CMAKE_CXX_
635
431
[NOTE]
636
432
====
637
433
Developers should also enable `-D BUILD_TESTING=ON`.
638
-
If any custom build of LLVM other than `RelWithDebInfo` is being used, the `LLVM_ROOT` variable should be set to the installation directory of that build.
0 commit comments