Skip to content

Clarify CMAKE_RUNTIME_LIB_DIRS #3759

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions reference/tools/cmake/cmaketoolchain.rst
Original file line number Diff line number Diff line change
Expand Up @@ -316,14 +316,14 @@ This is done to avoid potential name clashes with users own presets.
CONAN_RUNTIME_LIB_DIRS
^^^^^^^^^^^^^^^^^^^^^^

This variable defines the directories containing the runtime libraries necessary to
run the linked executables in the project of all host dependencies. These libraries are essential
to ensure that the project compiles and runs correctly, providing the necessary dependencies
during runtime. This is most useful when relying on CMake functionality to collect runtime dependencies,
for example to create a relocatable bundle.
This variable contains a list of directories that contain runtime libraries (like DLLs)
from all dependencies in the host context. This is intended to be used when relying on
CMake functionality to collect shared libraries to create a relocatable bundle, as
per the example below.


Just add the ``CONAN_RUNTIME_LIB_DIRS`` variable in our ``CMakeLists.txt`` file.
Just pass the ``CONAN_RUNTIME_LIB_DIRS`` variable to the ``DIRECTORIES`` argument
in the ``install(RUNTIME_DEPENDENCY_SET ...)``` invocation.

.. code:: cmake

Expand Down Expand Up @@ -681,4 +681,4 @@ CMakeToolchain is affected by these ``[conf]`` variables:
* ``fortran``: will set ``CMAKE_Fortran_COMPILER`` in *conan_toolchain.cmake*.
* ``asm``: will set ``CMAKE_ASM_COMPILER`` in *conan_toolchain.cmake*.
* ``hip``: will set ``CMAKE_HIP_COMPILER`` in *conan_toolchain.cmake*.
* ``ispc``: will set ``CMAKE_ISPC_COMPILER`` in *conan_toolchain.cmake*.
* ``ispc``: will set ``CMAKE_ISPC_COMPILER`` in *conan_toolchain.cmake*.