diff options
Diffstat (limited to 'mkspecs/features/qt_configure.prf')
-rw-r--r-- | mkspecs/features/qt_configure.prf | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 168a8e64f2..7c48badfaf 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -526,6 +526,17 @@ defineTest(qtConfSetupLibraries) { } } +defineReplace(qtGccSysrootifiedPath) { + return($$replace(1, ^=, $$[QT_SYSROOT])) +} + +defineReplace(qtGccSysrootifiedPaths) { + sysrootified = + for (path, 1): \ + sysrootified += $$qtGccSysrootifiedPath($$path) + return($$sysrootified) +} + # libs-var, libs, in-paths, out-paths-var defineTest(qtConfResolveLibs) { ret = true @@ -542,6 +553,7 @@ defineTest(qtConfResolveLibs) { out += $$l } else: contains(l, "^-L.*") { lp = $$replace(l, "^-L", ) + gcc: lp = $$qtGccSysrootifiedPath($$lp) !exists($$lp/.) { qtLog("Library path $$val_escape(lp) is invalid.") ret = false @@ -615,6 +627,7 @@ defineTest(qtConfResolveAllLibs) { # libs-var, in-paths, libs defineTest(qtConfResolvePathLibs) { ret = true + gcc: 2 = $$qtGccSysrootifiedPaths($$2) for (libdir, 2) { !exists($$libdir/.) { qtLog("Library path $$val_escape(libdir) is invalid.") @@ -665,6 +678,7 @@ defineReplace(qtConfGetTestIncludes) { # includes-var, in-paths, test-object-var defineTest(qtConfResolvePathIncs) { ret = true + gcc: 2 = $$qtGccSysrootifiedPaths($$2) for (incdir, 2) { !exists($$incdir/.) { qtLog("Include path $$val_escape(incdir) is invalid.") @@ -783,6 +797,11 @@ defineTest(qtConfLibrary_makeSpec) { !qtConfResolvePathIncs($${1}.includedir, $$eval(QMAKE_INCDIR_$$spec), $$2): \ return(false) + !isEmpty(QMAKE_EXPORT_INCDIR_$$spec) { + $${1}.exportincludedir = $$eval(QMAKE_EXPORT_INCDIR_$$spec) + export($${1}.exportincludedir) + } + # note that the object is re-exported, because we resolve the libraries. return(true) @@ -950,8 +969,11 @@ defineTest(qtConfExportLibrary) { } defines = $$eval($${spfx}.defines) !isEmpty(defines): qtConfOutputVar(assign, $$output, QMAKE_DEFINES_$$NAME, $$defines) - includes = $$eval($${spfx}.includedir) - !isEmpty(includes): qtConfOutputVar(assign, $$output, QMAKE_INCDIR_$$NAME, $$includes) + includes = $$eval($${spfx}.exportincludedir) + !equals(includes, -) { + isEmpty(includes): includes = $$eval($${spfx}.includedir) + !isEmpty(includes): qtConfOutputVar(assign, $$output, QMAKE_INCDIR_$$NAME, $$includes) + } uses = $$eval($${lpfx}.dependencies) !isEmpty(uses) { # FIXME: ideally, we would export transitive deps only for static |