• Advertisement
Sign in to follow this  

CMake include_directories() no such file or directory.

This topic is 687 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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) 


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.


Share this post

Link to post
Share on other sites
Looking at that last line in your problem description I suspect what you described earlier is not all you are doing and the problem happens in a dependency which tries to use your Renderer later on. Try using TARGET_INCLUDE_DIRECTORIES for your renderer instead of INCLUDE_DIRECTORIES.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement