[Qt-interest] qmake: setting INCLUDEPATH from a shell command output
Miguel Cardenas
mfcardenas at gmail.com
Sat Feb 14 18:45:08 CET 2009
Hello list
Am porting a console application to Qt but have troubles adding MySQL
includes and libraries to the Qt .PRO configuration...
In the console version just had to add to the Makefile something like:
INCLUDES = `mysql_config --include` ...
LIBS = `mysql_config --libs` ...
in the .PRO configuration file I have:
INCLUDEPATH += `mysql_config --include`
but it is interpreted as two strings separated by a space and it is expanded
as
-I`mysql_config -I--include`
that should be
-I`mysql_config --include`
and obviously compilation fails.
By now a temporal fix was to run by hand mysql_config and manually copy the
parameters to the .PRO configuration but it will not help if it is compiled
in different platforms or with MySQL installed in different base directories
and the idea is just to run qmake so the user should not care to set by hand
the variables.
My concrete question is: how can I insert the output of mysql_config to the
INCLUDEPATH and LIBS variables and let know qmake they should be unchanged
or not processed so the `mysql_config -I--include` remains untouched?
Thanks for your help
--
Miguel Cardenas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090214/83de4fd1/attachment.html
More information about the Qt-interest-old
mailing list