84f2357032eaa9df2cc3946960649dec87b0cc19
[occt.git] / adm / qmake / OccModule.pri
1 # This is a project template file defining an OCCT Module.
2 # This project should be included with predefined OCC_MODULE_NAME variable.
3 TEMPLATE = subdirs
4 exists(custom.auto.pri) { include(custom.auto.pri) }
5 exists(custom.pri)      { include(custom.pri) }
6
7 # Iterate over Toolkits within current Module and generate sub-project per Toolkit
8 aModuleList = $$cat(../MODULES, lines)
9 for (aModuleIter, aModuleList) {
10   #aTkList = $$list($$aModuleIter) - this doesn't work, qmake bug?
11   aModule = $$first($$list($$aModuleIter))
12   equals (aModule, $$OCC_MODULE_NAME) {
13     for (aToolKit, $$list($$aModuleIter)) {
14       toSkipToolkit = 0
15       equals (aToolKit, $$OCC_MODULE_NAME)      { toSkipToolkit = 1 }
16       !HAVE_VTK:equals (aToolKit, "TKIVtk")     { toSkipToolkit = 1 }
17       !HAVE_VTK:equals (aToolKit, "TKIVtkDraw") { toSkipToolkit = 1 }
18       !win32:   equals (aToolKit, "TKD3DHost")  { toSkipToolkit = 1 }
19       !win32:   equals (aToolKit, "TKD3DHostTest") { toSkipToolkit = 1 }
20       equals (toSkipToolkit, 0) {
21         #warning(aToolKit($$OCC_MODULE_NAME)=$$aToolKit)
22         eval(occtkgen_$${aToolKit}.input  = $$_PRO_FILE_PWD_/../OccToolkit.pro.in)
23         eval(occtkgen_$${aToolKit}.output = $$_PRO_FILE_PWD_/$${aToolKit}/$${aToolKit}.pro)
24         eval(occtkgen_$${aToolKit}.config = verbatim)
25         eval(QMAKE_SUBSTITUTES += occtkgen_$${aToolKit})
26         SUBDIRS += $${aToolKit}
27
28         aModExtList = $$cat(../../src/$${aToolKit}/EXTERNLIB, lines)
29         aTkDepends = $${aToolKit}.depends
30         for (aModExtIter, aModExtList) {
31           contains ($$list($$aModuleIter), $$aModExtIter) { eval ($${aTkDepends} += $$aModExtIter) }
32         }
33         #warning($$aToolKit depends on: $$reverse($${aTkDepends}))
34       }
35     }
36   }
37 }