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 $top_srcdir variable
Forum Updated to NodeBB v4.3 + New Features

The $top_srcdir variable

Scheduled Pinned Locked Moved General and Desktop
9 Posts 3 Posters 4.8k 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
    Arukas
    wrote on last edited by
    #1

    Hello-

    Can anyone shed some light on the $top_srcdir? I'm using Qt in linux and I can't figure out where this is defined or how to define it. So far everything, I have read is above me.

    Thanks,
    Arukas

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      Which build system are you actually using?

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Arukas
        wrote on last edited by
        #3

        The default one instlalled by Qt.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

          The default is qmake.

          So where did you see that variable? Where do you want to use it?

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Arukas
            wrote on last edited by
            #5

            Each part of the project has its own project file, and they have the $top_srcdir pointing to the main project file.

            I'd like to set those pointing to where I have my main project.

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tobias.hunger
              wrote on last edited by
              #6

              Did you read the section on variables in "the Qmake manual":http://qt-project.org/doc/qt-4.8/qmake-advanced-usage.html?

              1 Reply Last reply
              0
              • A Offline
                A Offline
                Arukas
                wrote on last edited by
                #7

                top_srcdir is a preset output variables, so that manual isn't applicable.

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  dbzhang800
                  wrote on last edited by
                  #8

                  [quote author="Arukas" date="1336662769"]Each part of the project has its own project file, and they have the $top_srcdir pointing to the main project file.

                  I'd like to set those pointing to where I have my main project. [/quote]

                  • Create a .pri file under your top source directory.
                  • In this .pri file

                  @

                  common.pri

                  top_srcdir = $$PWD
                  @

                  • inlcude the .pri into your .pro files

                  @
                  include(path/common.pri)
                  @

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    tobias.hunger
                    wrote on last edited by
                    #9

                    Sorry, I do not understand what you want to do. Where did you find top_srcdir to be a preset output variable?

                    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