Jump to content
  • Advertisement
Sign in to follow this  
Warezovvv

CMake include_directories() no such file or directory.

This topic is 867 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) 

              -CMakeLists.txt

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!

Share this post


Link to post
Share on other sites
Advertisement
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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!