0

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.

JuicyKitty
  • 318
  • 1
  • 16
  • That file is created in the build directory and not in the project directory so I think it is a configuration problem, how do you compile your project? If you use QtCreator then it will be created in the build-xxx folder, if you use qmake in the console then they are created next to the executable – eyllanesc Mar 30 '21 at 00:10
  • @eyllanesc, I run qmake && make from root of the project and 'DESTDIR = build/bin' – JuicyKitty Mar 30 '21 at 00:12
  • Therein lies the problem: the build directory is where you run qmake. I recommend doing the following: `mkdir build` `cd build` `qmake ../` `make` – eyllanesc Mar 30 '21 at 00:14
  • @eyllanesc I see. Thanks for a note! Think that was basic misunderstanding of qmake tool – JuicyKitty Mar 30 '21 at 00:16

1 Answers1

1

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
eyllanesc
  • 235,170
  • 19
  • 170
  • 241