Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-33196

Support for Conan 2 two-step workflow (conan install → CMake) in Qt Creator

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • None
    • None

      In Conan 2, recommended workflow is to explicitly run conan install before invoking CMake.

      At the moment, before opening a new project in Qt Creator, I need to manually run:

      conan install . --profile:all=myprofile -s build_type=Debug
      conan install . --profile:all=myprofile -s build_type=RelWithDebInfo
      

      This is necessary to ensure that all dependencies are installed and that the CMake presets are generated. These presets are later used by Qt Creator during project import. Without them, the IDE cannot detect or apply the correct configuration.

      It's also important to be able to run conan install automatically before CMake reconfiguration for an already existing project — not as a separate custom build step, as currently possible with Conan plugin.

      I suggest extending the CMake Qt Vendor Presets with two new optional fields:
       - executeBeforeOpenNewCMakeProject
       - executeBeforeCMakeRun

      These fields would allow specifying a custom command (e.g. conan install or a user-defined script) to be executed before Qt Creator opens a new CMake project or reconfigures an existing one.
      Alternatively, a separate configuration file could be introduced to define this behavior, but I would prefer the vendor preset-based approach.
      I would also be fully satisfied with any other solution that achieves the same behavior.

        1. cmake-hooks.patch
          7 kB
        2. example.zip
          3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            cadam Cristian Adam
            chozen Lev Bazilskiy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes