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. The INTERFACE_QT_MAJOR_VERSION property of "Qt5::Core"
Forum Updated to NodeBB v4.3 + New Features

The INTERFACE_QT_MAJOR_VERSION property of "Qt5::Core"

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 1.9k Views 1 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.
  • S Offline
    S Offline
    Son Pham
    wrote on last edited by
    #1

    bf3a2965-f544-4fe1-827c-d4903f49f403-image.png
    Hi everyone.
    I am trying to build my app on ubuntu 22.04 with Qt6.5.0 But it seems occur this CMake Error. Anyone know where is the reason?
    Thanks

    sierdzioS 1 Reply Last reply
    0
    • S Son Pham

      bf3a2965-f544-4fe1-827c-d4903f49f403-image.png
      Hi everyone.
      I am trying to build my app on ubuntu 22.04 with Qt6.5.0 But it seems occur this CMake Error. Anyone know where is the reason?
      Thanks

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @Son-Pham how do you import Qt in your cmake? find_project etc.

      (Z(:^

      S 1 Reply Last reply
      0
      • sierdzioS sierdzio

        @Son-Pham how do you import Qt in your cmake? find_project etc.

        S Offline
        S Offline
        Son Pham
        wrote on last edited by
        #3

        @sierdzio like this:

        find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets LinguistTools)
        find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets LinguistTools OpenGL OpenGLWidgets)
        

        And my source code works on Ubuntu 20

        sierdzioS 1 Reply Last reply
        0
        • S Son Pham

          @sierdzio like this:

          find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets LinguistTools)
          find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets LinguistTools OpenGL OpenGLWidgets)
          

          And my source code works on Ubuntu 20

          sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          @Son-Pham yes, that looks correct. Maybe throw Core in there to be sure.

          Are you certain you are building with Qt 6.5.0? Maybe you have some other Qt 5 installation in $PATH?

          (Z(:^

          S 1 Reply Last reply
          0
          • sierdzioS sierdzio

            @Son-Pham yes, that looks correct. Maybe throw Core in there to be sure.

            Are you certain you are building with Qt 6.5.0? Maybe you have some other Qt 5 installation in $PATH?

            S Offline
            S Offline
            Son Pham
            wrote on last edited by
            #5

            @sierdzio This is $PATH I set
            addb6259-48f3-4e41-9943-da2b985a4bcf-image.png

            I ran CMake command like this:

            cmake -DCMAKE_PREFIX_PATH=/home/Qt/6.5.2/gcc_64 -DQT_DIR=/home/Qt/6.5.2/gcc_64/lib/cmake/Qt6 -DCMAKE_BUILD_TYPE=Release ..
            
            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