conan-io / cmake-conan

CMake wrapper for conan C and C++ package manager
MIT License
821 stars 250 forks source link

use different profile while using conan install within cmake #574

Open laxmij-cmd opened 10 months ago

laxmij-cmd commented 10 months ago

What is your question?

Hi,

image

As per this documentation, conan install is invoked within cmake. My issue is: I have to provide different profile path to conan install. How can I do this?

Best Regards Laxmi

Have you read the CONTRIBUTING guide?

laxmij-cmd commented 10 months ago

This requirement is only for 1 project. In conan 1.x I was able to do so using conan_cmake_install

memsharded commented 10 months ago

This looks like a cmake-conan issue, moving it to the right repo

memsharded commented 10 months ago

Thanks for your question. The documentation for this is in https://github.com/conan-io/cmake-conan/tree/develop2#customizing-conan-profiles, something like:

-DCONAN_HOST_PROFILE=default;auto-cmake: perform autodetection as described above, and fallback to the default profile for anything else (default behaviour). -DCONAN_HOST_PROFILE=clang16: do not perform autodetection, and use the clang16 profile which must exist in the Conan profiles folder (see docs.)