2017-05-30 52 views

回答

0

message()需要使用不同的符号来表示某种原因:

message(DESTDIR: ($$DESTDIR)) 

我今天有这样的问题。仅通过查看Qt mailing list中的qmake .pro文件示例解决。另一个可能的问题 - clue variables

# ${VAR} notation allows to append the contents of the variable to another value 
# without separating the two with a space 
isEmpty(DESTDIR): DESTDIR = $${IDE_BUILD_TREE}/lib/qtcreator/plugins 

没有这种记号我得到空DESTDIR变量。如果没有设置DESTDIR,我相信二进制文件保持在构建目录中。

另一个有用的链接:https://stackoverflow.com/a/7754767/630169