CMake 3.24 does not set the include path for Visual Studio correctly when using Vulkan

Hi,

I use cmake to generate project file for Visual Studio using Vulkan.
Doing this:

    target_link_libraries(vkal
        PRIVATE Vulkan::Vulkan
        PRIVATE Vulkan::shaderc_combined
    )

previously would set the include path for my Visual Studio project. But with Cmake version 3.24 this is not the case anymore.
Even explicitly setting the include to:

    target_include_directories(vkal
        PRIVATE ${Vulkan_INCLUDE_DIRS})   

will not set the include dir. Downgrading to CMake version 3.23 helps.
Cmake 3.24 only sets an additional command line in Visual Studio, namely

external I:"<path to vulkan sdk include folder>"

but this only helps when building! Intellisense will have no idea how to find the Vulkan API symbols, which is annoying as this is one of the things I want to have an IDE for in the first place!

I don’t know if this is a feature or a bug, but to me it seems like a bug (even if it is supposed to be a feature!)

Thank you.

Kind regards, pythno

See issue 23834. Use VS 17.3 or higher.

Thank you for bringing this to my attention! I didn’t even know the external include is a new feature in VS. With the updated version it does indeed work :slight_smile: