Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt3D: Using Qt3DExtras Module in Qt C++ with Cmake.
QtWS25 Last Chance

Qt3D: Using Qt3DExtras Module in Qt C++ with Cmake.

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 4.2k Views
  • 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.
  • R Offline
    R Offline
    Rhnbmpl_z
    wrote on last edited by Rhnbmpl_z
    #1

    Hi,
    I am working on a Qt application using Qt C++ and Qt3D. I am using Cmake to build my project. I want to use Qt3DExtras module but it is showing the error in the line contained in my CMakeLists.txt : find_package(Qt REQUIRED COMPONENTS 3DCore 3DInput 3DExtras) :

    Could not find a package configuration file provided by "Qt53DExtras" with any of the following names: 
    Qt53DExtrasConfig.cmake qt53dextras-config.cmake Add the installation prefix of "Qt53DExtras" to CMAKE_PREFIX_PATH or 
    set "Qt53DExtras_DIR" to a directory containing one of the above files.  If "Qt53DExtras" provides a separate development 
    package or SDK, be sure it has been installed. my_project/CMakeLists.txt:36 (find_package) 
    

    I am using Qt 5.10.1 on Ubuntu 16.04.
    Thanks.

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

      Hi and welcome to devnet,

      How did you install Qt ?
      Did you check the content of the lib/cmake folder ins your Qt installation ?

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

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Rhnbmpl_z
        wrote on last edited by
        #3

        I installed Qt using the Online installer provided by the Qt website.
        Yes, the lib/cmake folder contains the Qt3DExtras module.

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

          Then how are you calling cmake to build your project ?

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

          1 Reply Last reply
          0
          • D Offline
            D Offline
            Dariusz
            wrote on last edited by Dariusz
            #5

            Works fine with find_package(Qt53DExtras REQUIRED).... did you try that one? Eeee snap im on win u on ubuntu :c sorry :- (

            1 Reply Last reply
            0
            • R Offline
              R Offline
              Rhnbmpl_z
              wrote on last edited by
              #6

              I am following the Qt5 docs for building with CMake: https://doc.qt.io/archives/qt-5.10/cmake-manual.html.
              All the other modules are loading fine(3DCore,3DRenderer,etc.), but the 3DExtras Module is giving errors.

              1 Reply Last reply
              0
              • R Offline
                R Offline
                Rhnbmpl_z
                wrote on last edited by Rhnbmpl_z
                #7

                I found the problem: The linux environment variable path was set to the default Qt directory with missing modules. Despite changing the Qt's path from QtCreator, it was still accessing from the old Qt directory. I set the path in CMakeLists.txt by:

                set(Qt5Core_DIR "/usr/local/Qt-5.10.1/lib/cmake/Qt5Core")
                set(Qt5_DIR "/usr/local/Qt-5.10.1/lib/cmake/Qt5")
                set(QT_QMAKE_EXECUTABLE "/usr/local/Qt-5.10.1/bin/qmake")
                
                1 Reply Last reply
                1

                • Login

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