make src/ subdir optional
there is at least one examples-only repo (qtwebkit-examples). we look for tools/ only when src/ is also present, based on the assumption that if there was only tools/, it would be actually named src/ (like in qttools). the split between the two is nowadays arbitrary anyway. Change-Id: I982b1d0e26dd7d0a5de751546099a58f86390124 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
fda41c1857
commit
f1fd824ebb
@ -19,22 +19,24 @@ TEMPLATE = subdirs
|
|||||||
bp = $$eval($$upper($$TARGET)_BUILD_PARTS)
|
bp = $$eval($$upper($$TARGET)_BUILD_PARTS)
|
||||||
!isEmpty(bp): QT_BUILD_PARTS = $$bp
|
!isEmpty(bp): QT_BUILD_PARTS = $$bp
|
||||||
|
|
||||||
sub_src.subdir = src
|
exists($$_PRO_FILE_PWD_/src/src.pro) {
|
||||||
sub_src.target = sub-src
|
sub_src.subdir = src
|
||||||
SUBDIRS = sub_src
|
sub_src.target = sub-src
|
||||||
|
SUBDIRS += sub_src
|
||||||
|
|
||||||
exists($$_PRO_FILE_PWD_/tools/tools.pro) {
|
exists($$_PRO_FILE_PWD_/tools/tools.pro) {
|
||||||
sub_tools.subdir = tools
|
sub_tools.subdir = tools
|
||||||
sub_tools.target = sub-tools
|
sub_tools.target = sub-tools
|
||||||
sub_tools.depends = sub_src
|
sub_tools.depends = sub_src
|
||||||
# conditional treatment happens on a case-by-case basis
|
# conditional treatment happens on a case-by-case basis
|
||||||
SUBDIRS += sub_tools
|
SUBDIRS += sub_tools
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exists($$_PRO_FILE_PWD_/examples/examples.pro) {
|
exists($$_PRO_FILE_PWD_/examples/examples.pro) {
|
||||||
sub_examples.subdir = examples
|
sub_examples.subdir = examples
|
||||||
sub_examples.target = sub-examples
|
sub_examples.target = sub-examples
|
||||||
sub_examples.depends = sub_src
|
contains(SUBDIRS, sub_src): sub_examples.depends = sub_src
|
||||||
examples_need_tools: sub_examples.depends += sub_tools
|
examples_need_tools: sub_examples.depends += sub_tools
|
||||||
!contains(QT_BUILD_PARTS, examples): sub_examples.CONFIG = no_default_target no_default_install
|
!contains(QT_BUILD_PARTS, examples): sub_examples.CONFIG = no_default_target no_default_install
|
||||||
SUBDIRS += sub_examples
|
SUBDIRS += sub_examples
|
||||||
@ -44,7 +46,7 @@ exists($$_PRO_FILE_PWD_/examples/examples.pro) {
|
|||||||
exists($$_PRO_FILE_PWD_/demos/demos.pro) {
|
exists($$_PRO_FILE_PWD_/demos/demos.pro) {
|
||||||
sub_demos.subdir = demos
|
sub_demos.subdir = demos
|
||||||
sub_demos.target = sub-demos
|
sub_demos.target = sub-demos
|
||||||
sub_demos.depends = sub_src
|
contains(SUBDIRS, sub_src): sub_demos.depends = sub_src
|
||||||
examples_need_tools: sub_demos.depends += sub_tools
|
examples_need_tools: sub_demos.depends += sub_tools
|
||||||
!contains(QT_BUILD_PARTS, examples): sub_demos.CONFIG = no_default_target no_default_install
|
!contains(QT_BUILD_PARTS, examples): sub_demos.CONFIG = no_default_target no_default_install
|
||||||
SUBDIRS += sub_demos
|
SUBDIRS += sub_demos
|
||||||
@ -53,7 +55,7 @@ exists($$_PRO_FILE_PWD_/demos/demos.pro) {
|
|||||||
exists($$_PRO_FILE_PWD_/tests/tests.pro) {
|
exists($$_PRO_FILE_PWD_/tests/tests.pro) {
|
||||||
sub_tests.subdir = tests
|
sub_tests.subdir = tests
|
||||||
sub_tests.target = sub-tests
|
sub_tests.target = sub-tests
|
||||||
sub_tests.depends = sub_src # The tests may have a run-time only dependency on other parts
|
contains(SUBDIRS, sub_src): sub_tests.depends = sub_src # The tests may have a run-time only dependency on other parts
|
||||||
tests_need_tools: sub_tests.depends += sub_tools
|
tests_need_tools: sub_tests.depends += sub_tools
|
||||||
sub_tests.CONFIG = no_default_install
|
sub_tests.CONFIG = no_default_install
|
||||||
!contains(QT_BUILD_PARTS, tests) {
|
!contains(QT_BUILD_PARTS, tests) {
|
||||||
|
Loading…
Reference in New Issue
Block a user