From 1df62c1cdda0dbd1f050248efb414308d72ef535 Mon Sep 17 00:00:00 2001 From: Ernesto de Gracia Herranz Date: Mon, 29 Apr 2024 17:17:33 +0200 Subject: [PATCH 1/4] doc CONAN_RUNTIME_LIB_DIRS --- reference/tools/cmake/cmaketoolchain.rst | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/reference/tools/cmake/cmaketoolchain.rst b/reference/tools/cmake/cmaketoolchain.rst index ed5ba97a5f1f..e4aaa93dee55 100644 --- a/reference/tools/cmake/cmaketoolchain.rst +++ b/reference/tools/cmake/cmaketoolchain.rst @@ -312,6 +312,41 @@ 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 +build and execute the project in the development environment. These libraries are essential +to ensure that the project compiles and runs correctly, providing the necessary dependencies +during runtime. + + +An example of usage would be first to add the additional paths we want in our ``conanfile.py``: + +.. code:: python + + class ConanExample(ConanFile): + def package_info(self): + self.cpp_info.builddirs = ["/path/to/builddir1", "/path/to/builddir2"] + +Then 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} + ) + + Using a custom toolchain file ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From f30dd6e1e8a0983dc2deb297f6efdf33f6ee82e9 Mon Sep 17 00:00:00 2001 From: Ernesto de Gracia Herranz Date: Mon, 29 Apr 2024 18:01:33 +0200 Subject: [PATCH 2/4] more --- reference/tools/cmake/cmaketoolchain.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reference/tools/cmake/cmaketoolchain.rst b/reference/tools/cmake/cmaketoolchain.rst index e4aaa93dee55..a974fbadfa6e 100644 --- a/reference/tools/cmake/cmaketoolchain.rst +++ b/reference/tools/cmake/cmaketoolchain.rst @@ -316,9 +316,10 @@ CONAN_RUNTIME_LIB_DIRS ^^^^^^^^^^^^^^^^^^^^^^ This variable defines the directories containing the runtime libraries necessary to -build and execute the project in the development environment. These libraries are essential +run the linked executables in the project. These libraries are essential to ensure that the project compiles and runs correctly, providing the necessary dependencies -during runtime. +during runtime. This is most useful when relying on CMake functionality to collect runtime dependencies, +for example to create a relocatable bundle. An example of usage would be first to add the additional paths we want in our ``conanfile.py``: From 0311f3354b42976b5b0b7ea9398488324cca20d1 Mon Sep 17 00:00:00 2001 From: Ernesto de Gracia Herranz Date: Tue, 4 Jun 2024 17:02:54 +0200 Subject: [PATCH 3/4] Update reference/tools/cmake/cmaketoolchain.rst --- reference/tools/cmake/cmaketoolchain.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/tools/cmake/cmaketoolchain.rst b/reference/tools/cmake/cmaketoolchain.rst index e566e995ed5c..c8802a5c007e 100644 --- a/reference/tools/cmake/cmaketoolchain.rst +++ b/reference/tools/cmake/cmaketoolchain.rst @@ -317,7 +317,7 @@ CONAN_RUNTIME_LIB_DIRS ^^^^^^^^^^^^^^^^^^^^^^ This variable defines the directories containing the runtime libraries necessary to -run the linked executables in the project. These libraries are essential +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. From def9c5d50681419f8019005a7aa059843a380687 Mon Sep 17 00:00:00 2001 From: Ernesto de Gracia Herranz Date: Tue, 4 Jun 2024 17:16:44 +0200 Subject: [PATCH 4/4] Update cmaketoolchain.rst --- reference/tools/cmake/cmaketoolchain.rst | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/reference/tools/cmake/cmaketoolchain.rst b/reference/tools/cmake/cmaketoolchain.rst index c8802a5c007e..e465d478b1b3 100644 --- a/reference/tools/cmake/cmaketoolchain.rst +++ b/reference/tools/cmake/cmaketoolchain.rst @@ -323,15 +323,7 @@ during runtime. This is most useful when relying on CMake functionality to colle for example to create a relocatable bundle. -An example of usage would be first to add the additional paths we want in our ``conanfile.py``: - -.. code:: python - - class ConanExample(ConanFile): - def package_info(self): - self.cpp_info.builddirs = ["/path/to/builddir1", "/path/to/builddir2"] - -Then add the ``CONAN_RUNTIME_LIB_DIRS`` variable in our ``CMakeLists.txt`` file. +Just add the ``CONAN_RUNTIME_LIB_DIRS`` variable in our ``CMakeLists.txt`` file. .. code:: cmake