CMake: Fix call to qvkgen for cross-builds with tools

We must not call the qvkgen tool that was built for the target but the
one that's located in QT_HOST_PATH.

Change-Id: I6d23a8e3abd84d449517630f3b9f0d50e333c327
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Joerg Bornemann 2020-07-07 14:34:30 +02:00
parent a158dc2e76
commit 97741a9590

View File

@ -858,8 +858,17 @@ if (QT_FEATURE_vulkan)
set(vulkan_fun_p_cpp "qvulkanfunctions_p.cpp")
list(APPEND vulkan_fun_outputs "vulkan/${vulkan_fun_p_cpp}")
if(QT_HOST_PATH)
qt_path_join(qvkgen
"${QT_HOST_PATH}"
"${QT${PROJECT_VERSION_MAJOR}_HOST_INFO_BINDIR}"
"qvkgen")
else()
set(qvkgen "${QT_CMAKE_EXPORT_NAMESPACE}::qvkgen")
endif()
list(APPEND vulkan_fun_command_content
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::qvkgen
COMMAND "${qvkgen}"
"${CMAKE_CURRENT_SOURCE_DIR}/vulkan/vk.xml"
"${PROJECT_SOURCE_DIR}/header.LGPL"
"${CMAKE_CURRENT_BINARY_DIR}/vulkan/qvulkanfunctions"