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

**URL:** https://discourse.cmake.org/t/cmake-3-24-does-not-set-the-include-path-for-visual-studio-correctly-when-using-vulkan/6598
**Category:** Development
**Created:** [October 4, 2022, 4:40pm UTC](https://discourse.cmake.org/t/cmake-3-24-does-not-set-the-include-path-for-visual-studio-correctly-when-using-vulkan/6598 "2022-10-04T16:40:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![pythno](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/p/8edcca/32.png) [@pythno](https://discourse.cmake.org/u/pythno)
#### Post date: [October 4, 2022, 4:40pm UTC](https://discourse.cmake.org/t/cmake-3-24-does-not-set-the-include-path-for-visual-studio-correctly-when-using-vulkan/6598/1 "2022-10-04T16:40:25Z")

</div>

Hi,

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

```auto
    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:

```auto
    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

```auto
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

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [October 4, 2022, 4:57pm UTC](https://discourse.cmake.org/t/cmake-3-24-does-not-set-the-include-path-for-visual-studio-correctly-when-using-vulkan/6598/2 "2022-10-04T16:57:04Z")

</div>

See [issue 23834](https://gitlab.kitware.com/cmake/cmake/-/issues/23834). Use VS 17.3 or higher.

---

<div class="post-metadata">

### Author: ![pythno](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/p/8edcca/32.png) [@pythno](https://discourse.cmake.org/u/pythno)
#### Post date: [October 4, 2022, 7:15pm UTC](https://discourse.cmake.org/t/cmake-3-24-does-not-set-the-include-path-for-visual-studio-correctly-when-using-vulkan/6598/3 "2022-10-04T19:15:20Z")

</div>

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 🙂
