Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-91115

Conan: Support using cmake, qmake via virtualenv generators

    XMLWordPrintable

Details

    • User Story
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • Packaging & Installer
    • None

    Description

      We aim to support building Qt examples that depend on Conan modules from command line, with minimal setup required by the user. The virtual[run]env generator seems to be ideal for this:

      export QTDIR=<qt_dir>
      conan install --generator virtualenv <src_dir>
      activate.sh # Sets up CMAKE_PREFIX_PATH etc
      cmake -D CMAKE_PREFIX_PATH=$QTDIR <src_dir>
      cmake --build .
      ./example
      
      export QTDIR=<qt_dir>
      conan install --generator virtualenv <src_dir>
      activate.sh # Sets up QMAKE_PATH
      $QTDIR/qmake <src_dir>
      make
      ./example
      

      Extend the module recipes so that following environment variables are set:

      QMAKEPATH (root of the module's mkspecs directory)
      CMAKE_PREFIX_PATH (root of the module's lib directory)
      QT_ADDITIONAL_PACKAGES_PREFIX_PATH (root of the module's lib directory)

      and, on Windows,

      PATH (pointing to module's bin folder)

      Document for the examples in the respective modules

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-91115
          # Subject Branch Project Status CR V

          Activity

            People

              kkohne Kai Köhne
              kkohne Kai Köhne
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes