问题描述
在qmake中我有
REPC_SOURCE = rpc/SomeRPC.rep
并在项目的根目录中生成 rep_SomeRPC_source.h
。我想将它存储在其他地方以尽可能保持 root 干净。
文档说 repc creates the rep_SimpleSwitch_source.h header in the build directory that you specify
。但是如何指定build directory
?
我看到的唯一选择是更改 OUT_PWD
,但文档说 Do not attempt to overwrite the value of this variable.
解决方法
构建目录是您运行 qmake 的文件夹(在您的情况下,它似乎是项目文件夹)导致获得包含源代码、中间文件和二进制文件的文件夹的不良影响。
改为使用运行 qmake 的不同文件夹:
mkdir build
cd build
qmake /path/of/project-directory
make