[Qt-interest] Get parent directory when including .pro files

Jeroen Wijnhout jeroen.wijnhout at gmail.com
Fri Sep 4 12:40:27 CEST 2009


Hi,

What I always did is to create a Config.pri (qmake include file) file
containing the test. This file can then be included into you .pro
files using
include("/path/to/Config.pri")

best,
Jeroen

On Fri, Sep 4, 2009 at 9:52 AM, Lars Amsel<lars.amsel at signalion.com> wrote:
> Hi,
>
> I use a master.pro to manage tasks that are common to my projects. One is to
> add the resource file to the build flags.
>
> ----8<----8<----
> win32 {
>   QMAKE_LFLAGS_WINDOWS += $${TARGET}.res
> }
> ----8<----8<----
>
> There are a few projects that do not have such a resource. So I want to do a
> test whether the resource file exists before added it the the make flags.
> Unfortunately
>
> win32 {
>   exists($${TARGET}.res) {
>     QMAKE_LFLAGS_WINDOWS += $${TARGET}.res
>   }
> }
>
> does not work as exists do the test in the directory of the master.pro instead
> of the project.pro. Is there a variable that holds this information or some
> other trick?
>
> regards
>
> Lars
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>




More information about the Qt-interest-old mailing list