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. CMake get Qt5 source directory variable
Forum Updated to NodeBB v4.3 + New Features

CMake get Qt5 source directory variable

Scheduled Pinned Locked Moved Solved Installation and Deployment
6 Posts 2 Posters 607 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.
  • A Offline
    A Offline
    Alexey Serebryakov
    wrote on last edited by
    #1

    Hi guys,
    how can I get Qt5 source directory in CMakeLists.txt?

    For example I have Qt5 installation on Windows: C:\Qt\5.12.9, on Linux ~/Qt/5.12.9. This folders contains Src path.

    So I need following in my CMakeLists.txt:

    set(MY_QT5_SRC_DIR C:\Qt\5.12.9\Src)

    Thanks a lot!

    Christian EhrlicherC 1 Reply Last reply
    0
    • A Alexey Serebryakov

      @Christian-Ehrlicher yeah I see,

      I wish build static library with C:\Qt\5.12.9\Src\qttools\src\shared\qtpropertybrowser for my app. :-). Yeah I know that can be find in Qt solution but in Qt source more comfortable because from the box.

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

      Then copy the sources over to your sources. When I as a user want to compile your app and then would need the entire Qt sources I would give up.

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

      A 1 Reply Last reply
      1
      • A Alexey Serebryakov

        Hi guys,
        how can I get Qt5 source directory in CMakeLists.txt?

        For example I have Qt5 installation on Windows: C:\Qt\5.12.9, on Linux ~/Qt/5.12.9. This folders contains Src path.

        So I need following in my CMakeLists.txt:

        set(MY_QT5_SRC_DIR C:\Qt\5.12.9\Src)

        Thanks a lot!

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

        FindQt[456].cmake will and can't return you the directory of the sources Qt was compiled from since the sources are normally not distributed and also not needed to compile and link against Qt. Why do you need the Qt sources when you compile your app?

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

        A 1 Reply Last reply
        1
        • Christian EhrlicherC Christian Ehrlicher

          FindQt[456].cmake will and can't return you the directory of the sources Qt was compiled from since the sources are normally not distributed and also not needed to compile and link against Qt. Why do you need the Qt sources when you compile your app?

          A Offline
          A Offline
          Alexey Serebryakov
          wrote on last edited by
          #3

          @Christian-Ehrlicher yeah I see,

          I wish build static library with C:\Qt\5.12.9\Src\qttools\src\shared\qtpropertybrowser for my app. :-). Yeah I know that can be find in Qt solution but in Qt source more comfortable because from the box.

          Christian EhrlicherC 1 Reply Last reply
          0
          • A Alexey Serebryakov

            @Christian-Ehrlicher yeah I see,

            I wish build static library with C:\Qt\5.12.9\Src\qttools\src\shared\qtpropertybrowser for my app. :-). Yeah I know that can be find in Qt solution but in Qt source more comfortable because from the box.

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

            Then copy the sources over to your sources. When I as a user want to compile your app and then would need the entire Qt sources I would give up.

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

            A 1 Reply Last reply
            1
            • A Alexey Serebryakov has marked this topic as solved on
            • Christian EhrlicherC Christian Ehrlicher

              Then copy the sources over to your sources. When I as a user want to compile your app and then would need the entire Qt sources I would give up.

              A Offline
              A Offline
              Alexey Serebryakov
              wrote on last edited by
              #5

              @Christian-Ehrlicher but what the package I need to install for build my app using Qt sources?

              Christian EhrlicherC 1 Reply Last reply
              0
              • A Alexey Serebryakov

                @Christian-Ehrlicher but what the package I need to install for build my app using Qt sources?

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

                The Qt source package I would guess?

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

                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