diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-04-29 12:39:52 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-05-05 13:15:37 +0000 |
commit | 6288c12bb4316c8970ab8437ef5beefce89f5836 (patch) | |
tree | 893b99b096681f744f5a63fb50c204d44ad74b0e /mkspecs/features | |
parent | 5d76529580b72ead582b6e09112b5b94c0b11113 (diff) | |
download | qtbase-6288c12bb4316c8970ab8437ef5beefce89f5836.tar.gz |
Resolve QMAKE_INCDIR_VULKAN on every qmake call
Do not store this variable locally, because
a) it might change if the SDK location changes
b) does not play well with Qt installer packages which would provide the
include path of the build machine.
To achieve this we introduce the (usual) magic value - for
QMAKE_EXPORT_INCDIR_VULKAN to denote "do not export this value".
Fixes: QTBUG-73796
Change-Id: Ied26ee12cbcdf7f5f6e1caef5d29dadf6309c5d6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'mkspecs/features')
-rw-r--r-- | mkspecs/features/qt_configure.prf | 6 | ||||
-rw-r--r-- | mkspecs/features/qt_module_pris.prf | 8 | ||||
-rw-r--r-- | mkspecs/features/win32/windows_vulkan_sdk.prf | 8 |
3 files changed, 18 insertions, 4 deletions
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index b2dd846b11..95e54d72c9 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -959,8 +959,10 @@ defineTest(qtConfExportLibrary) { defines = $$eval($${spfx}.defines) !isEmpty(defines): qtConfOutputVar(assign, $$output, QMAKE_DEFINES_$$NAME, $$defines) includes = $$eval($${spfx}.exportincludedir) - isEmpty(includes): includes = $$eval($${spfx}.includedir) - !isEmpty(includes): qtConfOutputVar(assign, $$output, QMAKE_INCDIR_$$NAME, $$includes) + !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 diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf index e0556ce960..e892f83432 100644 --- a/mkspecs/features/qt_module_pris.prf +++ b/mkspecs/features/qt_module_pris.prf @@ -60,8 +60,12 @@ defineReplace(qtExportLibsForModule) { QMAKE_LIBS_$$NAME QMAKE_LIBS_$${NAME}_DEBUG QMAKE_LIBS_$${NAME}_RELEASE \ QMAKE_DEFINES_$$NAME QMAKE_INCDIR_$$NAME for (var, vars) { - defined($$var, var): \ - result += "$$var = $$val_escape($$var)" + expvar = $$var + expvar ~= s/^QMAKE_/QMAKE_EXPORT_/ + defined($$expvar, var):equals($$expvar, -): next() + !defined($$expvar, var): expvar = $$var + defined($$expvar, var): \ + result += "$$var = $$val_escape($$expvar)" } } return($$result) diff --git a/mkspecs/features/win32/windows_vulkan_sdk.prf b/mkspecs/features/win32/windows_vulkan_sdk.prf new file mode 100644 index 0000000000..6c08e28fe9 --- /dev/null +++ b/mkspecs/features/win32/windows_vulkan_sdk.prf @@ -0,0 +1,8 @@ +isEmpty(QMAKE_INCDIR_VULKAN) { + # Pick up the VULKAN_SDK env var set by the LunarG SDK so that the Vulkan + # headers are found out-of-the-box on typical Windows setups. + QMAKE_INCDIR_VULKAN = $$(VULKAN_SDK)\\include + + # Do not export the include dir but resolve it on every qmake call. + QMAKE_EXPORT_INCDIR_VULKAN = - +} |