FindVulkan: Broken on Windows with Vulkan 1.3.236
I have CMake 3.25.1 (cmake-3.25.1-windows-x86_64.msi), Windows 10 64 Bit and VulkanSDK 1.3.236.0
find_package(Vulkan REQUIRED) gives error:
CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
1> [CMake] Could NOT find Vulkan (missing: Vulkan_LIBRARY) (found version "1.3.236")
1> [CMake] Call Stack (most recent call first):
1> [CMake] C:/Program Files/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
1> [CMake] C:/Program Files/CMake/share/cmake-3.25/Modules/FindVulkan.cmake:597 (find_package_handle_standard_args)
1> [CMake] CMakeLists.txt:31 (find_package)
After some tests I found out, that the error happens here (Modules/FindVulkan.cmake line 249):
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(_Vulkan_hint_executable_search_paths
"$ENV{VULKAN_SDK}/Bin"
)
set(_Vulkan_hint_library_search_paths
"$ENV{VULKAN_SDK}/Lib"
"$ENV{VULKAN_SDK}/Bin"
)
else()
set(_Vulkan_hint_executable_search_paths
"$ENV{VULKAN_SDK}/Bin32"
)
set(_Vulkan_hint_library_search_paths
"$ENV{VULKAN_SDK}/Lib32"
"$ENV{VULKAN_SDK}/Bin32"
)
endif()
"if(CMAKE_SIZEOF_VOID_P EQUAL 8)" gives me FALSE, so it sets the search paths to Lib32 / Bin32, but the VulkanSDK has only a Lib and Bin Folder. Changing it to "if(TRUE)" worked.