Skip to content
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

doc: CONAN_RUNTIME_LIB_DIRS to the conan_toolchain.cmake #3698

Merged
merged 5 commits into from
Jun 4, 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
28 changes: 28 additions & 0 deletions reference/tools/cmake/cmaketoolchain.rst
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,34 @@ By default it is ``"conan"``, and it will generate CMake presets named "conan-xx
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
ErniGH marked this conversation as resolved.
Show resolved Hide resolved
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.


Just add the ``CONAN_RUNTIME_LIB_DIRS`` variable in our ``CMakeLists.txt`` file.

.. code:: cmake

install(RUNTIME_DEPENDENCY_SET my_app_deps
PRE_EXCLUDE_REGEXES
[[api-ms-win-.*]]
[[ext-ms-.*]]
[[kernel32\.dll]]
[[libc\.so\..*]] [[libgcc_s\.so\..*]] [[libm\.so\..*]] [[libstdc\+\+\.so\..*]]
POST_EXCLUDE_REGEXES
[[.*/system32/.*\.dll]]
[[^/lib.*]]
[[^/usr/lib.*]]
DIRECTORIES ${CONAN_RUNTIME_LIB_DIRS}
)

absolute_paths
^^^^^^^^^^^^^^

Expand Down