Hi,
I have a project with quite a few Qt-libraries and applications, organized in a directory structure and built using a central session file:
Directory structure:
build/Qt/MyProject.pro
libs/lib1/lib1.pro
libs/lib2/lib2.pro
app/app1.pro
build/Qt/MyProject.pro
libs/lib1/lib1.pro
libs/lib2/lib2.pro
app/app1.pro
To copy to clipboard, switch view to plain text mode
where MyProject.pro looks like:
TEMPLATE = subdirs
SUBDIRS = Lib1 Lib2 App1
Lib1.file = ../../libs/lib1/lib1.pro
Lib2.file = ../../libs/lib2/lib2.pro
App1.file = ../../app/app1.pro
App1.depends = Lib1 Lib2
TEMPLATE = subdirs
SUBDIRS = Lib1 Lib2 App1
Lib1.file = ../../libs/lib1/lib1.pro
Lib2.file = ../../libs/lib2/lib2.pro
App1.file = ../../app/app1.pro
App1.depends = Lib1 Lib2
To copy to clipboard, switch view to plain text mode
Now I want to use different Qt kits to test the compilation. The output directories are created like:
build/build-MyProject-Desktop_Qt_5_15_2_MSVC2019_64bit-Debug
build/build-MyProject-Desktop_Qt_5_12_3_MSVC2017_64bit-Debug
build/build-MyProject-Desktop_Qt_5_15_2_MSVC2019_64bit-Debug
build/build-MyProject-Desktop_Qt_5_12_3_MSVC2017_64bit-Debug
To copy to clipboard, switch view to plain text mode
Question:
How can I define in my lib1.pro, lib2.pro and app1.pro files that the objects, moc, ui files etc. are all placed under the respective kit?
app/app1.pro:
OBJECTS_DIR = ???? -> should go to build/build-MyProject-Desktop_Qt_5_15_2_MSVC2019_64bit-Debug/App1
MOC_DIR = ???? -> should go to build/build-MyProject-Desktop_Qt_5_15_2_MSVC2019_64bit-Debug/App1/moc
UI_DIR = ???? -> should go to build/build-MyProject-Desktop_Qt_5_15_2_MSVC2019_64bit-Debug/App1/ui
OBJECTS_DIR = ???? -> should go to build/build-MyProject-Desktop_Qt_5_15_2_MSVC2019_64bit-Debug/App1
MOC_DIR = ???? -> should go to build/build-MyProject-Desktop_Qt_5_15_2_MSVC2019_64bit-Debug/App1/moc
UI_DIR = ???? -> should go to build/build-MyProject-Desktop_Qt_5_15_2_MSVC2019_64bit-Debug/App1/ui
To copy to clipboard, switch view to plain text mode
or rephrased, how do I obtain the OUT_DIR = build-MyProject-Desktop_Qt_5_15_2_MSVC2019_64bit-Debug of the sessions project inside app1.pro ?
Bookmarks