This commit is contained in:
bthomee
2025-12-04 07:37:43 -08:00
parent a0dbc140a3
commit a7662a71b0

View File

@@ -151,20 +151,25 @@ Patched recipes</h3>
<div class="fragment"><div class="line">conan remote add --index 0 xrplf https://conan.ripplex.io</div>
</div><!-- fragment --><p>Alternatively, you can pull the patched recipes into the repository and use them locally:</p>
<div class="fragment"><div class="line">cd external</div>
<div class="line">mkdir -p conan-center-index</div>
<div class="line">cd conan-center-index</div>
<div class="line">git init</div>
<div class="line">git remote add origin git@github.com:XRPLF/conan-center-index.git</div>
<div class="line">git sparse-checkout init</div>
<div class="line">git sparse-checkout set recipes/ed25519</div>
<div class="line">git sparse-checkout add recipes/grpc</div>
<div class="line">git sparse-checkout add recipes/secp256k1</div>
<div class="line">git sparse-checkout add recipes/snappy</div>
<div class="line">git sparse-checkout add recipes/soci</div>
<div class="line">git fetch origin master</div>
<div class="line">git checkout master</div>
<div class="line">conan export --version 2015.03 recipes/ed25519/all</div>
<div class="line">conan export --version 0.7.0 recipes/secp256k1/all</div>
<div class="line">conan export --version 1.1.10 recipes/snappy/all</div>
<div class="line">conan export --version 4.0.3 recipes/soci/all</div>
<div class="line">rm -rf .git</div>
<div class="line">cd ../..</div>
<div class="line">conan export --version 2015.03 external/conan-center-index/recipes/ed25519/all</div>
<div class="line">conan export --version 1.72.0 external/conan-center-index/recipes/grpc/all</div>
<div class="line">conan export --version 0.7.0 external/conan-center-index/recipes/secp256k1/all</div>
<div class="line">conan export --version 1.1.10 external/conan-center-index/recipes/snappy/all</div>
<div class="line">conan export --version 4.0.3 external/conan-center-index/recipes/soci/all</div>
</div><!-- fragment --><p>In the case we switch to a newer version of a dependency that still requires a patch, it will be necessary for you to pull in the changes and re-export the updated dependencies with the newer version. However, if we switch to a newer version that no longer requires a patch, no action is required on your part, as the new recipe will be automatically pulled from the official Conan Center.</p>
<blockquote class="doxtable">
<p>&zwj;[!NOTE] You might need to add <code>--lockfile=""</code> to your <code>conan install</code> command to avoid automatic use of the existing <code>conan.lock</code> file when you run <code>conan export</code> manually on your machine </p>
@@ -281,12 +286,7 @@ Build and Test</h3>
</div><!-- fragment --><p class="startli">To build Debug, in the next step, be sure to set <code>-DCMAKE_BUILD_TYPE=Debug</code></p>
<p class="startli">For a single-configuration generator, e.g. <code>Unix Makefiles</code> or <code>Ninja</code>, you only need to run this command once. For a multi-configuration generator, e.g. <code>Visual Studio</code>, you may want to run it more than once.</p>
<p class="startli">Each of these commands should also have a different <code>build_type</code> setting. A second command with the same <code>build_type</code> setting will overwrite the files generated by the first. You can pass the build type on the command line with <code>--settings build_type=$BUILD_TYPE</code> or in the profile itself, under the section <code>[settings]</code> with the key <code>build_type</code>.</p>
<p class="startli">If you are using a Microsoft Visual C++ compiler, then you will need to ensure consistency between the <code>build_type</code> setting and the <code>compiler.runtime</code> setting.</p>
<p class="startli">When <code>build_type</code> is <code>Release</code>, <code>compiler.runtime</code> should be <code>MT</code>.</p>
<p class="startli">When <code>build_type</code> is <code>Debug</code>, <code>compiler.runtime</code> should be <code>MTd</code>.</p>
<div class="fragment"><div class="line">conan install .. --output-folder . --build missing --settings build_type=Release --settings compiler.runtime=MT</div>
<div class="line">conan install .. --output-folder . --build missing --settings build_type=Debug --settings compiler.runtime=MTd</div>
</div><!-- fragment --></li>
</li>
<li><p class="startli">Configure CMake and pass the toolchain file generated by Conan, located at <code>$OUTPUT_FOLDER/build/generators/conan_toolchain.cmake</code>.</p>
<p class="startli">Single-config generators:</p>
<p class="startli">Pass the CMake variable <a href="https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html"><code>CMAKE_BUILD_TYPE</code></a> and make sure it matches the one of the <code>build_type</code> settings you chose in the previous step.</p>