There is a feature I really like in qt creator and it is the Shadow build. When the Shadow Build is on, all the generated files (*.moc, Makefile, *.o) will be generated in a given source directory, so the sources directory is kept clean. I am moving from qt creator to kdevelop and I am trying to figure out how this feature works, so far I can create the resulting binary, the moc files and object files to the extra directory using the variables DESTDIR
, OBJECTS_DIR
and MOC_DIR
but I cannot create the makefile in this diretory. Any ideas?
相关问题
- How can I listen to a C++ signal from QML?
- How to setup Qt Creator to work with CMake on Mac
- switch may fall through (no it may not)
- How to solve module “”QtQuick.Controls“ version 2.
- Execute shell command using qmake
相关文章
- How to make QtLinguist shipped with Qt 5.9.1 work?
- Qt Creator fails to start debugging on Mac
- Adding custom target in qmake
- How to obtain debug/release conditional compiling
- How to create a vcproj with qmake such that its fi
- Prepend/Append Makefile to a Qt generated Makefile
- signals sent by qtcreator on “stop”
- GNU make --jobs option in QMAKE
AFAIK what QtCreator does, basically boils down to this:
this creates the Makefile itself in the build directory and simply running
there creates all temporary files under the build directory, using the sources from the original directory. This does not require any special stuff in the .pro file but just depends on the usage "from the outside".
You can also try the experimental QMake support plugin for KDevelop: https://projects.kde.org/kdev-qmake
It asks you for a build folder on first start and does the shadow-build stuff. Note that you need to make sure your .pro and .pri files are written properly - it's quite easy to mess it up. CMake is much simpler in that regard!