[Interest] Multiple .qmake.conf files in SUBDIRS project

Carel Combrink carel.combrink at gmail.com
Mon Aug 31 10:30:38 CEST 2015


Hi,

Is the following behaviour correct regarding multiple .qmake.conf files in
a SUBDIRS project:
I have a Library (MyLib) that has a .qmake.conf file in its top folder that
defines the following:

LIB_TOP_BUILD_DIR=$$shadowed($$PWD)


I now want to build my library as part of another project (the application,
MyApp).
So I create the following folder structure:
* TopFolder
    * MyApp
        - MyApp.pro
    * MyLib
        - MyLib.pro
        - .qmake.conf (contains LIB_TOP_BUILD_DIR=$$shadowed($$PWD))
    - MyProj.pro (Contains TEMPLATE = subdirs; SUBDIRS += MyLib MyApp)
    - .qmake.conf (contains  LIB_TOP_BUILD_DIR=$$shadowed($$PWD))

If I put message("LIB_TOP_BUILD_DIR is: $$LIB_TOP_BUILD_DIR") before the
line in the conf file in the library it prints out:

Project MESSAGE: LIB_TOP_BUILD_DIR is:


The idea was to test the variable in the conf file in the library and if
not set it to the output path. But if it is set, to not set it again. But
with the current implementation the library overwrites the value set in the
top level config file since the value appears empty in the conf file of the
lib.

Is this expected?
Is there a way that I can get the following done without having to remove
the conf file in the library each time I try to build the application in
this way? The library is managed in subversion so removing the .qmake.conf
file is not the preferred option.

I am using Qt 5.3.1, gcc 64 on Ubuntu 14.04

Regards,
Carel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150831/a87f0466/attachment.html>


More information about the Interest mailing list