qtqmakeqtremoteobjects

How to specify repc's output path in qmake?


in qmake I have

REPC_SOURCE = rpc/SomeRPC.rep

and it generates rep_SomeRPC_source.h in the root of the project. I would like to store it somewhere else to keep root as clean as possible.
Documentation says repc creates the rep_SimpleSwitch_source.h header in the build directory that you specify. But how to specify build directory?
The only option I see is to change OUT_PWD, but documentation says Do not attempt to overwrite the value of this variable.


Solution

  • The build directory is the folder where you run qmake (in your case it seems to be the project folder) causing the unwanted effect of obtaining a folder with the source code, intermediate files and binaries.

    Instead use a different folder where you run qmake:

    mkdir build
    cd build
    qmake /path/of/project-directory
    make