2017-05-30 140 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