another qmake INCLUDEPATH spaces problem
In order to include some linux kernel .h files in my app, I'd like to add the following to my INCLUDEPATH in the .pro file:
INCLUDEPATH += /usr/src/kernels/$(shell uname -r)/include
Unfortunately what appears in the Makefile is this:
-I/usr/src/kernels/$(shell\ uname\ -r)/include
qmake is escaping the spaces which is causing the "shell uname -r" to not work within make. Placing the string in double quotes resolves the escaping issue, but also causes qmake to treat spaces as a delimiter and thus preface everything with a -I.
Is there a way to get around this w/qmake 2.01a?
Thanks for any help,
Mark
Re: another qmake INCLUDEPATH spaces problem
How about using qmake's built-in system() function?
Code:
INCLUDEPATH += /usr/src/kernels/$$system(uname -r)/include
Re: another qmake INCLUDEPATH spaces problem
Quote:
Originally Posted by
jpn
How about using qmake's built-in
system() function?
Code:
INCLUDEPATH += /usr/src/kernels/$$system(uname -r)/include
Sure, that does work but it forces the Makefile to be Kernel specific. My hope was to be able to build on different kernels without needing to generate a new Makefile.
Mark
Re: another qmake INCLUDEPATH spaces problem
Looks d*mn ugly but should work:
Code:
INCLUDEPATH += /usr/src/kernels/$(shell$${LITERAL_WHITESPACE}uname$${LITERAL_WHITESPACE}-r)/include
Re: another qmake INCLUDEPATH spaces problem
Not as ugly as some things I tried. It works brilliantly, and is much appreciated!
Mark