The $top_srcdir variable
-
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 -
Which build system are you actually using?
-
The default one instlalled by Qt.
-
The default is qmake.
So where did you see that variable? Where do you want to use it?
-
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.
-
Did you read the section on variables in "the Qmake manual":http://qt-project.org/doc/qt-4.8/qmake-advanced-usage.html?
-
top_srcdir is a preset output variables, so that manual isn't applicable.
-
[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)
@ -
Sorry, I do not understand what you want to do. Where did you find top_srcdir to be a preset output variable?