Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
The $top_srcdir variable
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.
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.
dbzhang800 last edited by
[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
top_srcdir = $$PWD
- inlcude the .pri into your .pro files
Sorry, I do not understand what you want to do. Where did you find top_srcdir to be a preset output variable?