diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-04-06 17:39:03 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-04-07 08:04:23 (GMT) |
commit | 3279b07302fde0eb14f9b197c9ad2e14d512817e (patch) | |
tree | 9f43592d3e1cfc2a9486c0104da6b6935f544b49 | |
parent | 730b936b53633891e2b8c505a3ff4c93209e7ae8 (diff) | |
download | Qt-3279b07302fde0eb14f9b197c9ad2e14d512817e.zip Qt-3279b07302fde0eb14f9b197c9ad2e14d512817e.tar.gz Qt-3279b07302fde0eb14f9b197c9ad2e14d512817e.tar.bz2 |
make shadow builds with default moc/ui dirs work again
append the source dir to the include path, but only after the dirs with
the generated files.
this seems to have worked before only accidentally: the unqualified
default dirs were expanded to the source dir instead of the build dir,
but the build dir is added implicitly by default, so things magically
worked. now that we qualify the moc/ui dirs, projects relying on the
strange side effect suddenly break.
we should probably add the source dir to the include path by default,
but this coupling to uic/moc is closer to the historical behavior and
thus should be safer.
Reviewed-by: mariusSO
-rw-r--r-- | mkspecs/features/include_source_dir.prf | 1 | ||||
-rw-r--r-- | mkspecs/features/moc.prf | 7 | ||||
-rw-r--r-- | mkspecs/features/uic.prf | 7 |
3 files changed, 15 insertions, 0 deletions
diff --git a/mkspecs/features/include_source_dir.prf b/mkspecs/features/include_source_dir.prf new file mode 100644 index 0000000..8794998 --- /dev/null +++ b/mkspecs/features/include_source_dir.prf @@ -0,0 +1 @@ +!equals(_PRO_FILE_PWD_, $$OUT_PWD):INCLUDEPATH *= . diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf index f1dcf37..f18d462 100644 --- a/mkspecs/features/moc.prf +++ b/mkspecs/features/moc.prf @@ -66,6 +66,13 @@ win32:moc_dir_short ~= s,^.:,/, contains(moc_dir_short, ^[/\\\\].*):INCLUDEPATH += $$MOC_DIR else:INCLUDEPATH += $$OUT_PWD/$$MOC_DIR +# Backwards compatibility: Make shadow builds with default MOC_DIR work +# if the user did not add the source dir explicitly. +equals(MOC_DIR, .) { + CONFIG -= include_source_dir + CONFIG = include_source_dir $$CONFIG +} + #auto depend on moc unix:!no_mocdepend { moc_source.depends += $$first(QMAKE_MOC) diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf index c7b1686..0c7fb1b 100644 --- a/mkspecs/features/uic.prf +++ b/mkspecs/features/uic.prf @@ -39,6 +39,13 @@ win32:ui_dir_short ~= s,^.:,/, contains(ui_dir_short, ^[/\\\\].*):INCLUDEPATH += $$UI_HEADERS_DIR else:INCLUDEPATH += $$OUT_PWD/$$UI_HEADERS_DIR +# Backwards compatibility: Make shadow builds with default UI_DIR work +# if the user did not add the source dir explicitly. +equals(UI_DIR, .) { + CONFIG -= include_source_dir + CONFIG = include_source_dir $$CONFIG +} + uic3 { isEmpty(FORMS3) { UIC3_FORMS = FORMS |