[Qt-creator] qmake and backtick command arguments

Ziller Eike Eike.Ziller at theqtcompany.com
Mon Feb 22 09:39:21 CET 2016


> On Feb 21, 2016, at 11:59 AM, Andrzej Telszewski <atelszewski at gmail.com> wrote:
> 
> On 21/02/16 11:53, Konstantin Tokarev wrote:
>> 
>> 
>> 21.02.2016, 13:50, "Andrzej Telszewski" <atelszewski at gmail.com>:
>>> On 21/02/16 11:34, Nikos Chantziaras wrote:
>>>>  On 21/02/16 11:47, Andrzej Telszewski wrote:
>>>>>  Hi,
>>>>> 
>>>>>  I'm trying to do something like this in .pro file:
>>>>>  INCLUDEPATH += \
>>>>>     `php-config --includes`
>>>> 
>>>>  Try the system() function in combination with the "$$" operator (for
>>>>  variable expansion):
>>>> 
>>>>     INCLUDEPATH += $$system(php-config --includes)
>>> 
>>> It works!
>>> 
>>> Now I have another problem:
>>> 
>>> The output of php-config --includes is:
>>> -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM
>>> -I/usr/include/php/Zend -I/usr/include/php/ext
>>> -I/usr/include/php/ext/date/lib
>>> 
>>> And in consequence INCLUDEPATH becomes:
>>> -I-I/usr/include/php -I-I/usr/include/php/main -I-I/usr/include/php/TSRM
>>> -I-I/usr/include/php/Zend -I-I/usr/include/php/ext
>>> -I-I/usr/include/php/ext/date/lib
>>> 
>>> that is, extra "-I" is added by qmake.
>>> 
>>> Is there an easy way to work around it?
>>> 
>>> "php-config" does not seem to have any possibility of tweaking its output.
>> 
>> You need to use QMAKE_CXXFLAGS (or QMAKE_CFLAGS if you build C) instead of INCLUDEPATH.
>> 
> 
> This yields yet another inconvenience. Using QMAKE_CFLAGS allows application to compile fine, but header files are not seen by Qt Creator and so cannot be nicely navigated.

Looks like Qt Creator handles QMAKE_CXXFLAGS, but not QMAKE_CFLAGS.

Br, Eike

> 
> Any thoughts on that?
> 
> -- 
> Best regards,
> Andrzej Telszewski
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator

-- 
Eike Ziller, Principle Software Engineer - The Qt Company GmbH
 
The Qt Company GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Tuula Haataja
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B



More information about the Qt-creator mailing list