CMake include_directories() no such file or directory.

Hello every one, I have very strange problem with cmake.
I have my vulkan sdk like env varibale as Vulkan_SDK which I can find be echo $Vulkan_SDK.
FindVulkan found this on.
Architecture of project

-Engine (folder)
--CMakeLists.txt which is doing next, find_package(Vulkan REQUIRED) and include_directories(${VULKAN_INCLUDE_DIR}),
add_subdirectory(Renderer), add_lbrary(Engine) and target_link_libraries(Renderer)
--Renderer (folder)
---CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
set(SourceGroup_Renderer
        Renderer.cpp
        VulkanAdapter.cpp
        )
source_group("Renderer" FILES ${SourceGroup_Renderer})

set(SOURCES ${SourceGroup_Renderer})

add_library(VorpalRenderer ${SOURCES })

target_link_libraries(VorpalRenderer ${VULKAN_LIBRARY}) 

And in Renderer folder in file VulkanAdapter.hpp <vulkan/vulkan.h> no such file or directory
But if I will message(${VULKAN_INCLUDE_DIR}) in Renderer/CMakeLists.txt, I get full path.
Also when I remove vulkan.h from Adapter.hpp and insert in Adapter.cpp, no errors.

Thanks!
Last edited on
Topic archived. No new replies allowed.