# missing vulkan even though i have vulkan and set the vulkan\_sdk env var to the proper directory

**URL:** https://discourse.cmake.org/t/missing-vulkan-even-though-i-have-vulkan-and-set-the-vulkan-sdk-env-var-to-the-proper-directory/7803
**Category:** Usage
**Tags:** os:windows
**Created:** [March 31, 2023, 4:03pm UTC](https://discourse.cmake.org/t/missing-vulkan-even-though-i-have-vulkan-and-set-the-vulkan-sdk-env-var-to-the-proper-directory/7803 "2023-03-31T16:03:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![samuelcarr](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/f0a364/32.png) [@samuelcarr](https://discourse.cmake.org/u/samuelcarr)
#### Post date: [March 31, 2023, 4:03pm UTC](https://discourse.cmake.org/t/missing-vulkan-even-though-i-have-vulkan-and-set-the-vulkan-sdk-env-var-to-the-proper-directory/7803/1 "2023-03-31T16:03:18Z")

</div>

```plaintext
CMake Error at E:/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Vulkan (missing: Vulkan_LIBRARY Vulkan_INCLUDE_DIR) (found
  version "")
Call Stack (most recent call first):
  E:/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  E:/CMake/share/cmake-3.26/Modules/FindVulkan.cmake:597 (find_package_handle_standard_args)
  src/CMakeLists.txt:285 (find_package)

```

and I set all references in the findvulkan.cmake to the proper path

this is the part I modified

```cmake
if(WIN32)
  set(_Vulkan_library_name vulkan-1)
  set(_Vulkan_hint_include_search_paths
    "$ENV{VULKAN_SDK}/Include"
  )
  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"
      "$ENV{VULKAN_SDK}/Lib32"
      "$ENV{VULKAN_SDK}/Bin32"
    )
  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"
      "$ENV{VULKAN_SDK}/Lib"
      "$ENV{VULKAN_SDK}/Bin"
    )
  endif()
else()
  set(_Vulkan_library_name vulkan-1)
  set(_Vulkan_hint_include_search_paths
    "$ENV{VULKAN_SDK}/Include"
  )
  set(_Vulkan_hint_executable_search_paths
    "$ENV{VULKAN_SDK}/Bin"
  )
  set(_Vulkan_hint_library_search_paths
    "$ENV{VULKAN_SDK}/Lib"
    "$ENV{VULKAN_SDK}/Bin"
    "$ENV{VULKAN_SDK}/Lib32"
    "$ENV{VULKAN_SDK}/Bin32"
  )
endif()

```

the path to the expected vulkan include dir component on my computer is env {vulkan\_sdk}/Include/vulkan/vulkan.h

the path to the expected vulkan library component on my computer is env {vulkan\_sdk}/lib/vulkan-1.lib or env {vulkan\_sdk}/lib32/vulkan-1.lib}

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [April 3, 2023, 11:41am UTC](https://discourse.cmake.org/t/missing-vulkan-even-though-i-have-vulkan-and-set-the-vulkan-sdk-env-var-to-the-proper-directory/7803/2 "2023-04-03T11:41:42Z")

</div>

Does passing `--debug-find` to CMake help show where/why CMake isn’t finding it?
