开发者

Using qmake variables

Is there a way to get qmake 开发者_Python百科to substitute a custom variable like this? In other words, I want $(LIBS) to be replaced with the variable LIBS, so that I can easily change the include path from machine to machine. Many thanks in advance!

LIBS = c:/tmp/libs.pfo
INCLUDEPATH += . \
$(LIBS)/OpenCV2.1-msvc/include \
$(LIBS)/OpenCV2.1-msvc/modules/core/include \
$(LIBS)/OpenCV2.1-msvc/modules/imgproc/include \
...

I have also tried this to no avail:

LIBS = c:/tmp/libs.pfo
INCLUDEPATH += . \
$$quote($$LIBS/OpenCV2.1-msvc/include) \
$$quote($$LIBS/OpenCV2.1-msvc/modules/core/include) \
$$quote($$LIBS/OpenCV2.1-msvc/modules/imgproc/include) \
...


UPDATE: After seeing another thread I tried a third trick, which worked! qmake can't evaluate a proper variable

LIBS = c:/tmp/libs.pfo
INCLUDEPATH += . \
$$quote($${LIBS}/OpenCV2.1-msvc/include) \
$$quote($${LIBS}/OpenCV2.1-msvc/modules/core/include) \
$$quote($${LIBS}/OpenCV2.1-msvc/modules/imgproc/include) \
...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜