gpt4 book ai didi

variables - 使用 qmake 变量

转载 作者:行者123 更新时间:2023-12-01 01:30:25 24 4
gpt4 key购买 nike

有没有办法让 qmake 替换这样的自定义变量?换句话说,我希望将 $(LIBS) 替换为变量 LIBS,以便我可以轻松地更改机器之间的包含路径。提前谢谢了!

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 \
...

我也试过这个无济于事:
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) \
...

最佳答案

更新:在看到另一个线程后,我尝试了第三个技巧,它奏效了! 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) \
...

关于variables - 使用 qmake 变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5199516/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com