summaryrefslogtreecommitdiffstats
path: root/src/opengl/qplatformbackingstoreopenglsupport.cpp
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-07-24 18:00:21 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-07-29 17:33:14 +0200
commit7b9904849fe1a43f0db8216076a9e974ebca5c78 (patch)
tree3a832c3e9cf89d9dcc806effdd6ddf9cf6402965 /src/opengl/qplatformbackingstoreopenglsupport.cpp
parent071fc289c407d2cbdcf6fc66504d6ad536ad9216 (diff)
CMake: Fix _nolink targets to be optional on the consumer side
On Windows, if Qt is built with Vulkan support but the user's machine does not have Vulkan, it should still be possible to configure and build an application (if the application does not use Vulkan of course). When Qt is built with qmake, the special windows_vulkan_sdk.prf file makes sure not to export build time Vulkan include headers into the generated .pri files. The same file also tries to find the include headers via an environment variable. If it isn't set, it just adds a bogus "/include" include path, which doesn't fail a user's application build. This wasn't the case for an application built with CMake, because the exported Vulkan_nolink target uncodinitionally referenced Vulkan's target properties. Which means that if the Vulkan package was not found, the application failed to configure. To mimic qmake's behavior, make sure to query the target properties only if the Vulkan target exists, via the TARGET_EXISTS generator expression. Apply the same logic to all _nolink targets. This might not be entirely correct in all cases, but we can revise this behavior later after more feedback. At the very least it allows building non-Vulkan based applications. Task-number: QTBUG-85240 Change-Id: Iffbb03a84e8637ed54d0811433e66fe6de43d71f Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'src/opengl/qplatformbackingstoreopenglsupport.cpp')
0 files changed, 0 insertions, 0 deletions