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. Qt6 - cmake
Forum Updated to NodeBB v4.3 + New Features

Qt6 - cmake

Scheduled Pinned Locked Moved Unsolved General and Desktop
14 Posts 5 Posters 5.2k 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.
  • SGaistS SGaist

    Hi,

    How did you install Qt 5 ?
    How did you install Qt 6 ?
    Do you have any custom software installed that makes use of Qt ?

    rootshellR Offline
    rootshellR Offline
    rootshell
    wrote on last edited by
    #3

    @SGaist Appreciate the response

    Qt5 was installed using the online installer and qmake
    Qt6 was installed using the online installer a cmake

    The Kit when installing Qt6 informed me i needed to upgrade cmake, I switched it to default to the cmake that came with Qt6.

    Im sure there are tons of programs on the box that use Qt, Im the only person using QtCreator to build software on the box.

    What ever is generating the CMakeLists.txt does not seem to detecting the version correctly.

    Certifications: CISSP, MCITP, MCSE, MCSA, BA, AA, AG, CST, CNST, Linux+, Security+, Server+, Network+, A+, iNet+

    Languages: C++, C#, VB, Python, Java

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

      Good, do you have any other Qt installed through e.g. macports or brew ?

      Could you test on the command line to see if you have the same issue ? I am just wondering whether Qt Creator may have some leftover settings interfering.

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

      rootshellR 1 Reply Last reply
      0
      • SGaistS SGaist

        Good, do you have any other Qt installed through e.g. macports or brew ?

        Could you test on the command line to see if you have the same issue ? I am just wondering whether Qt Creator may have some leftover settings interfering.

        rootshellR Offline
        rootshellR Offline
        rootshell
        wrote on last edited by
        #5

        @SGaist macports no, brew is installed and cmake listed
        I did brew uninstall cmake and verified it was gone

        same issue with QT / QTCreator generating CMakeLists.txt
        find_package(Qt5Core)

        Certifications: CISSP, MCITP, MCSE, MCSA, BA, AA, AG, CST, CNST, Linux+, Security+, Server+, Network+, A+, iNet+

        Languages: C++, C#, VB, Python, Java

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

          Ok, which Qt 6 release did you install exactly ?

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

          rootshellR 1 Reply Last reply
          0
          • SGaistS SGaist

            Ok, which Qt 6 release did you install exactly ?

            rootshellR Offline
            rootshellR Offline
            rootshell
            wrote on last edited by
            #7

            @SGaist

            The plot thickens...
            I just switched to my linux machine and name issue
            find_package(Qt5Core)

            Mac -
            I had removed Qt and did a fresh install.
            Newest Qt 6.0

            Linux -
            Have Qt 5.12. and and 15.5.0
            Ran the maintenance tool, updated all existing
            Reran - installed Qt 6.0
            Same issues on the linux box

            Certifications: CISSP, MCITP, MCSE, MCSA, BA, AA, AG, CST, CNST, Linux+, Security+, Server+, Network+, A+, iNet+

            Languages: C++, C#, VB, Python, Java

            rootshellR 1 Reply Last reply
            0
            • rootshellR rootshell

              @SGaist

              The plot thickens...
              I just switched to my linux machine and name issue
              find_package(Qt5Core)

              Mac -
              I had removed Qt and did a fresh install.
              Newest Qt 6.0

              Linux -
              Have Qt 5.12. and and 15.5.0
              Ran the maintenance tool, updated all existing
              Reran - installed Qt 6.0
              Same issues on the linux box

              rootshellR Offline
              rootshellR Offline
              rootshell
              wrote on last edited by
              #8

              @rootshell In case anyone is following this....
              Removed it on Linux and had a fail trying to install
              GUessing this has some rough edges, I will try to find out more.

              Screenshot from 2020-12-08 16-05-20.png

              Certifications: CISSP, MCITP, MCSE, MCSA, BA, AA, AG, CST, CNST, Linux+, Security+, Server+, Network+, A+, iNet+

              Languages: C++, C#, VB, Python, Java

              1 Reply Last reply
              0
              • Jonas KvingeJ Offline
                Jonas KvingeJ Offline
                Jonas Kvinge
                wrote on last edited by
                #9

                @rootshell said in Qt6 - cmake:

                CMakeLists.txt

                Can you share your CMakeLists.txt file?
                Are you sure you point to the correct source directory in the cmake command?

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

                  I just tested using cmake -DCMAKE_PREFIX_PATH=~/Qt/6.0.0/gcc_64/lib/cmake .. using one of Qt's example copied in a random folder and it worked properly nothing searched from Qt 5.

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

                  Tom assoT 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    I just tested using cmake -DCMAKE_PREFIX_PATH=~/Qt/6.0.0/gcc_64/lib/cmake .. using one of Qt's example copied in a random folder and it worked properly nothing searched from Qt 5.

                    Tom assoT Offline
                    Tom assoT Offline
                    Tom asso
                    wrote on last edited by Tom asso
                    #11

                    @SGaist - I am having a very similar issue. Trying to port Qt5 to Qt6. on ubuntu 22.04.
                    I had previously installed Qt5 packages with apt install - I removed all of those with apt remove. I installed Qt6.7.2 with the online installer into directory ~/Qt6. Now cmake find_package() succeeds when I set CMAKE_PREFIX_PATH to ~/Qt6/6.7.2/gcc_64/lib/cmake/:

                    find_package(
                      Qt6
                      COMPONENTS Gui Widgets Quick
                      REQUIRED)
                    

                    But cmake fails on the target with:

                    CMake Warning (dev) in src/qt-test2/CMakeLists.txt:
                      AUTOGEN: No valid Qt version found for target qt-test.  AUTOMOC, AUTOUIC
                      and AUTORCC disabled.  Consider adding:
                    
                        find_package(Qt5 COMPONENTS Widgets)
                    
                      to your CMakeLists.txt file.
                    

                    What am I doing wrong?

                    Christian EhrlicherC 1 Reply Last reply
                    0
                    • Tom assoT Tom asso

                      @SGaist - I am having a very similar issue. Trying to port Qt5 to Qt6. on ubuntu 22.04.
                      I had previously installed Qt5 packages with apt install - I removed all of those with apt remove. I installed Qt6.7.2 with the online installer into directory ~/Qt6. Now cmake find_package() succeeds when I set CMAKE_PREFIX_PATH to ~/Qt6/6.7.2/gcc_64/lib/cmake/:

                      find_package(
                        Qt6
                        COMPONENTS Gui Widgets Quick
                        REQUIRED)
                      

                      But cmake fails on the target with:

                      CMake Warning (dev) in src/qt-test2/CMakeLists.txt:
                        AUTOGEN: No valid Qt version found for target qt-test.  AUTOMOC, AUTOUIC
                        and AUTORCC disabled.  Consider adding:
                      
                          find_package(Qt5 COMPONENTS Widgets)
                      
                        to your CMakeLists.txt file.
                      

                      What am I doing wrong?

                      Christian EhrlicherC Offline
                      Christian EhrlicherC Offline
                      Christian Ehrlicher
                      Lifetime Qt Champion
                      wrote on last edited by
                      #12

                      @Tom-asso Why do you hijack an old thread when you already have a topic with your issue here?

                      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                      Visit the Qt Academy at https://academy.qt.io/catalog

                      Tom assoT 1 Reply Last reply
                      0
                      • Christian EhrlicherC Christian Ehrlicher

                        @Tom-asso Why do you hijack an old thread when you already have a topic with your issue here?

                        Tom assoT Offline
                        Tom assoT Offline
                        Tom asso
                        wrote on last edited by
                        #13

                        @Christian-Ehrlicher - Not intending to hijack anything - this thread is very relevant to my current issue.

                        SGaistS 1 Reply Last reply
                        0
                        • Tom assoT Tom asso

                          @Christian-Ehrlicher - Not intending to hijack anything - this thread is very relevant to my current issue.

                          SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #14

                          @Tom-asso You can also use the qt-cmake wrapper from the bin folder of 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
                          1

                          • Login

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