centralize handling of QT_BUILD_PARTS
Change-Id: I33b8c3958a102d87461ad887fa5749bd9a6dc037 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
This commit is contained in:
parent
8d2c59774d
commit
918fd56324
44
mkspecs/features/qt_parts.prf
Normal file
44
mkspecs/features/qt_parts.prf
Normal file
@ -0,0 +1,44 @@
|
||||
load(qt_build_config)
|
||||
|
||||
TEMPLATE = subdirs
|
||||
|
||||
sub_src.subdir = src
|
||||
sub_src.target = sub-src
|
||||
SUBDIRS = sub_src
|
||||
|
||||
exists(tools/tools.pro) {
|
||||
sub_tools.subdir = tools
|
||||
sub_tools.target = sub-tools
|
||||
sub_tools.depends = sub_src
|
||||
!contains(QT_BUILD_PARTS, tools): sub_tools.CONFIG = no_default_target no_default_install
|
||||
SUBDIRS += sub_tools
|
||||
}
|
||||
|
||||
exists(examples/examples.pro) {
|
||||
sub_examples.subdir = examples
|
||||
sub_examples.target = sub-examples
|
||||
sub_examples.depends = sub_src
|
||||
!contains(QT_BUILD_PARTS, examples): sub_examples.CONFIG = no_default_target no_default_install
|
||||
SUBDIRS += sub_examples
|
||||
}
|
||||
|
||||
# Some modules still have these
|
||||
exists(demos/demos.pro) {
|
||||
sub_demos.subdir = examples
|
||||
sub_demos.target = sub-examples
|
||||
sub_demos.depends = sub_src
|
||||
!contains(QT_BUILD_PARTS, examples): sub_demos.CONFIG = no_default_target no_default_install
|
||||
SUBDIRS += sub_demos
|
||||
}
|
||||
|
||||
exists(tests/tests.pro) {
|
||||
sub_tests.subdir = tests
|
||||
sub_tests.target = sub-tests
|
||||
sub_tests.depends = sub_src # The tests may have a run-time only dependency on tools
|
||||
sub_tests.CONFIG = no_default_install
|
||||
!contains(QT_BUILD_PARTS, tests): sub_tests.CONFIG += no_default_target
|
||||
SUBDIRS += sub_tests
|
||||
}
|
||||
|
||||
QT_BUILD_PARTS -= libs tools examples tests
|
||||
!isEmpty(QT_BUILD_PARTS): warning("Unknown build part(s): $$QT_BUILD_PARTS")
|
31
qtbase.pro
31
qtbase.pro
@ -2,39 +2,10 @@
|
||||
# Main projectfile
|
||||
#####################################################################
|
||||
|
||||
CONFIG += ordered
|
||||
TEMPLATE = subdirs
|
||||
load(qt_parts)
|
||||
|
||||
cross_compile: CONFIG += nostrip
|
||||
|
||||
module_qtbase_tests.subdir = tests
|
||||
module_qtbase_tests.target = module-qtbase-tests
|
||||
module_qtbase_tests.depends = module_qtbase_src
|
||||
module_qtbase_tests.CONFIG = no_default_install
|
||||
|
||||
#process the projects
|
||||
PROJECTS=$$eval($$list($$lower($$unique(QT_BUILD_PARTS))))
|
||||
# note that the order matters for these blocks!
|
||||
contains(PROJECTS, qmake) {
|
||||
PROJECTS -= qmake
|
||||
# nothing to be done
|
||||
}
|
||||
contains(PROJECTS, libs) {
|
||||
PROJECTS -= libs
|
||||
SUBDIRS += src
|
||||
}
|
||||
contains(PROJECTS, examples) {
|
||||
PROJECTS -= examples
|
||||
SUBDIRS += examples
|
||||
}
|
||||
contains(PROJECTS, tests) {
|
||||
PROJECTS -= tests
|
||||
SUBDIRS += module_qtbase_tests
|
||||
}
|
||||
!isEmpty(PROJECTS) {
|
||||
message(Unknown PROJECTS: $$PROJECTS)
|
||||
}
|
||||
|
||||
confclean.depends += clean
|
||||
confclean.commands =
|
||||
unix {
|
||||
|
Loading…
Reference in New Issue
Block a user