Setup the Build directory through variable in *.pro file. How?
Solved
General and Desktop
-
@bogong Is there a reason why you want to do this?
Build directory is the directory where you call qmake, there is usually no need to specify build directory in pro file (especially not absolute paths).
You can specify directory for build artefacts using DESTDIR. -
@jsulm DESTDIR - DO NOT define build directory. It's for result, where to put application out. This is not what I've been asking about. I am perfectly aware of:
DESTDIR = $$PWD/../../builds/$${BUILD_NAME}/$${BUILD_TYPE}_$${BUILD_PLATFORM} OBJECTS_DIR = $${DESTDIR}/.objects MOC_DIR = $${DESTDIR}/.moc RCC_DIR = $${DESTDIR}/.rcc UI_DIR = $${DESTDIR}/.ui
I am seeking what I've been asking about.
-
@bogong said in Setup the Build directory through variable in *.pro file. How?:
DO NOT define build directory
I didn't say it does...
-
You can't define that directory in .pro. Qt Creator will always override it, that's the whole point.
So either:
- use DESTDIR and disable shadow build in Qt creator
- or specify the destination dir in Qt Creator (you can modify the default one in settings)