Igalia / vkrunner

A shader script tester for Vulkan. Moved to https://gitlab.freedesktop.org/mesa/vkrunner
Other
43 stars 14 forks source link

README does not describe the build dependence on vulkan.h #15

Closed dneto0 closed 6 years ago

dneto0 commented 6 years ago

(Sorry, this submitted before I was ready.)

The README does not describe the build dependence on vulkan.h

It should say that vulkan.h should be found in one of two ways:

  1. via pkg-config (I'm not clear on the details), or
  2. Finding the vulkan.h via a regular source include. For example, I downloaded the vulkan headers and then pointed at them with -DCMAKE_REQUIRED_INCLUDES=
jaebaek commented 6 years ago

Even though we give -DCMAKE_REQUIRED_INCLUDES= argument, it fails when the compiler accesses vulkan/vulkan.h because the given path is not included in include_directories. See here.

Why don't we give an option like cmake -DVULKAN_INCLUDE_PATH:STRING=... or use an environment variable e.g., VULKAN_INCLUDE_PATH ?

bpeel commented 6 years ago

I’m not particularly experienced with CMake so I’m not sure what the standard way to do this is. It seems like there should just be a general way to add global include paths when invoking CMake. Perhaps one way to do it could be just to set the CFLAGS environment variable?

Please take a look at this proposed patch for the README and let me know if this meets your requirements.

jaebaek commented 6 years ago

The proposed patch solves this issue. I added minor comments on it. Thanks.