Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt 6.2.2: find_package fails although the Qt build seems to have succeeded
Forum Updated to NodeBB v4.3 + New Features

Qt 6.2.2: find_package fails although the Qt build seems to have succeeded

Scheduled Pinned Locked Moved Solved Installation and Deployment
5 Posts 3 Posters 1.3k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gvanvoor
    wrote on last edited by
    #1

    I've downloaded the Qt sources for 6.2.2 and configured with

    configure -opensource -debug-and-release -nomake examples -nomake tests -no-framework -confirm-license -skip qtwebengine -skip qtconnectivity -skip qtwebview -c++std c++17 -platform macx-clang -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_OSX_ARCHITECTURES=x86_64 -prefix "/usr/local/Qt-6.2.2"

    then built with

    cmake --build . --parallel

    and installed with

    sudo cmake --install .
    sudo cmake --install . --config Debug

    When I ran cmake on my project, I get the following errors:

    CMake Error at /usr/local/Qt-6.2.2/lib/cmake/Qt6DBus/Qt6DBusDependencies.cmake:71 (find_package):
    Could not find a package configuration file provided by "Qt6DBusTools"
    (requested version 6.2.2) with any of the following names:

    Qt6DBusToolsConfig.cmake
    qt6dbustools-config.cmake
    

    Add the installation prefix of "Qt6DBusTools" to CMAKE_PREFIX_PATH or set
    "Qt6DBusTools_DIR" to a directory containing one of the above files. If
    "Qt6DBusTools" provides a separate development package or SDK, be sure it
    has been installed.
    Call Stack (most recent call first):
    /usr/local/Qt-6.2.2/lib/cmake/Qt6DBus/Qt6DBusConfig.cmake:40 (include)
    /Applications/CMake.app/Contents/share/cmake-3.22/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
    /usr/local/Qt-6.2.2/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)
    /usr/local/Qt-6.2.2/lib/cmake/Qt6Gui/Qt6GuiDependencies.cmake:91 (_qt_internal_find_dependencies)
    /usr/local/Qt-6.2.2/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake:40 (include)
    CMakeLists.txt:178 (find_package)

    CMake Error at /Applications/CMake.app/Contents/share/cmake-3.22/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
    Found package configuration file:

    /usr/local/Qt-6.2.2/lib/cmake/Qt6DBus/Qt6DBusConfig.cmake
    

    but it set Qt6DBus_FOUND to FALSE so package "Qt6DBus" is considered to be
    NOT FOUND.
    Call Stack (most recent call first):
    /usr/local/Qt-6.2.2/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)
    /usr/local/Qt-6.2.2/lib/cmake/Qt6Gui/Qt6GuiDependencies.cmake:91 (_qt_internal_find_dependencies)
    /usr/local/Qt-6.2.2/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake:40 (include)
    CMakeLists.txt:178 (find_package)

    CMake Error at CMakeLists.txt:178 (find_package):
    Found package configuration file:

    /usr/local/Qt-6.2.2/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake
    

    but it set Qt6Gui_FOUND to FALSE so package "Qt6Gui" is considered to be
    NOT FOUND.

    This is on macOS 11.6.1 with XCode 13.1 and cmake 3.22.1.
    CMAKE_PREFIX_PATH is set to /usr/local/Qt-6.2.2/bin/
    The same configuration worked with Qt 6.0.1 (the only difference being an obviously different prefix path and the skipping of webenging and webview which wasn't necessaery because they weren't included).

    Any suggestions as to what may cause these problems and potential solutions?

    kshegunovK 1 Reply Last reply
    0
    • G gvanvoor

      I've downloaded the Qt sources for 6.2.2 and configured with

      configure -opensource -debug-and-release -nomake examples -nomake tests -no-framework -confirm-license -skip qtwebengine -skip qtconnectivity -skip qtwebview -c++std c++17 -platform macx-clang -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_OSX_ARCHITECTURES=x86_64 -prefix "/usr/local/Qt-6.2.2"

      then built with

      cmake --build . --parallel

      and installed with

      sudo cmake --install .
      sudo cmake --install . --config Debug

      When I ran cmake on my project, I get the following errors:

      CMake Error at /usr/local/Qt-6.2.2/lib/cmake/Qt6DBus/Qt6DBusDependencies.cmake:71 (find_package):
      Could not find a package configuration file provided by "Qt6DBusTools"
      (requested version 6.2.2) with any of the following names:

      Qt6DBusToolsConfig.cmake
      qt6dbustools-config.cmake
      

      Add the installation prefix of "Qt6DBusTools" to CMAKE_PREFIX_PATH or set
      "Qt6DBusTools_DIR" to a directory containing one of the above files. If
      "Qt6DBusTools" provides a separate development package or SDK, be sure it
      has been installed.
      Call Stack (most recent call first):
      /usr/local/Qt-6.2.2/lib/cmake/Qt6DBus/Qt6DBusConfig.cmake:40 (include)
      /Applications/CMake.app/Contents/share/cmake-3.22/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
      /usr/local/Qt-6.2.2/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)
      /usr/local/Qt-6.2.2/lib/cmake/Qt6Gui/Qt6GuiDependencies.cmake:91 (_qt_internal_find_dependencies)
      /usr/local/Qt-6.2.2/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake:40 (include)
      CMakeLists.txt:178 (find_package)

      CMake Error at /Applications/CMake.app/Contents/share/cmake-3.22/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
      Found package configuration file:

      /usr/local/Qt-6.2.2/lib/cmake/Qt6DBus/Qt6DBusConfig.cmake
      

      but it set Qt6DBus_FOUND to FALSE so package "Qt6DBus" is considered to be
      NOT FOUND.
      Call Stack (most recent call first):
      /usr/local/Qt-6.2.2/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)
      /usr/local/Qt-6.2.2/lib/cmake/Qt6Gui/Qt6GuiDependencies.cmake:91 (_qt_internal_find_dependencies)
      /usr/local/Qt-6.2.2/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake:40 (include)
      CMakeLists.txt:178 (find_package)

      CMake Error at CMakeLists.txt:178 (find_package):
      Found package configuration file:

      /usr/local/Qt-6.2.2/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake
      

      but it set Qt6Gui_FOUND to FALSE so package "Qt6Gui" is considered to be
      NOT FOUND.

      This is on macOS 11.6.1 with XCode 13.1 and cmake 3.22.1.
      CMAKE_PREFIX_PATH is set to /usr/local/Qt-6.2.2/bin/
      The same configuration worked with Qt 6.0.1 (the only difference being an obviously different prefix path and the skipping of webenging and webview which wasn't necessaery because they weren't included).

      Any suggestions as to what may cause these problems and potential solutions?

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by
      #2

      @gvanvoor said in Qt 6.2.2: find_package fails although the Qt build seems to have succeeded:

      CMAKE_PREFIX_PATH

      Did you set it?

      Read and abide by the Qt Code of Conduct

      G 1 Reply Last reply
      0
      • kshegunovK kshegunov

        @gvanvoor said in Qt 6.2.2: find_package fails although the Qt build seems to have succeeded:

        CMAKE_PREFIX_PATH

        Did you set it?

        G Offline
        G Offline
        gvanvoor
        wrote on last edited by
        #3

        @kshegunov yes: see the second sentence of the last paragraph

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          It should not point to bin but to "lib/cmake".

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          G 1 Reply Last reply
          1
          • SGaistS SGaist

            Hi,

            It should not point to bin but to "lib/cmake".

            G Offline
            G Offline
            gvanvoor
            wrote on last edited by
            #5

            @SGaist That did the trick. Thanks. Strange that this worked in Qt 6.0.1 though.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved