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
I want to package some CMake build scripts in a conan package.
For include(some-build-script.cmake) to work at consumers of this package, they must add the path of the CMake scripts to its CMAKE_PREFIX_PATH / CMAKE_MODULE_PATH.
I have not seen a way to conveniently add something like this.
The attributes that can be set inside package_info() don't cover this case.
Have I missed something?
What's the best solution for this problem?
Have you read the CONTRIBUTING guide?
I've read the CONTRIBUTING guide
The text was updated successfully, but these errors were encountered:
Basically you need to self.cpp_info.builddirs = ["path/with/cmake"] so this path is added to the CMAKE_ paths (via conan_toolchain.cmake from CMakeToolchain
thanks, that is exactly what I asked for. I must have missed that.
May I suggest to extend the documentation of find_paths inside the CMakeToolchain documentation, to make that more easily discoverable when searching the documentation for CMAKE_XXXX_PATH (and maybe link the example somewhere)? Adding something like "Also adds the declared builddirs from cpp_info of host dependencies".
Yes, sounds good, this is pending some more detailed documentation, but it will probably be associated to the new CMakeConfigDeps generator, as this is information more associated to dependencies than to the toolchain.
What is your question?
Hi,
I want to package some CMake build scripts in a conan package.
For
include(some-build-script.cmake)
to work at consumers of this package, they must add the path of the CMake scripts to its CMAKE_PREFIX_PATH / CMAKE_MODULE_PATH.I have not seen a way to conveniently add something like this.
The attributes that can be set inside
package_info()
don't cover this case.Have I missed something?
What's the best solution for this problem?
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: