KhronosGroup / KTX-Software

KTX (Khronos Texture) Library and Tools
Other
854 stars 226 forks source link

Prevent warning if VK_NO_PROTOTYPES is already defined #855

Closed jherico closed 6 months ago

CLAassistant commented 6 months ago

CLA assistant check
All committers have signed the CLA.

MarkCallow commented 6 months ago

@jherico how come you encountered this? vk_funcs.h is internal to the library.

jherico commented 6 months ago

The Vulkan-Sample uses KTX as a git submodule and incorporates the build directly into it's top level project, so any upstream warnings show up as part of the build of that project.

MarkCallow commented 6 months ago

The Vulkan-Sample uses KTX as a git submodule and incorporates the build directly into it's top level project, so any upstream warnings show up as part of the build of that project.

But where did the other definition of VK_NO_PROTOTYPES come from that was visible when libktx was being compiled? When you say "build directly" do you mean Vukan-Sample is including the libktx sources directly and setting up its own compile commands?

jherico commented 6 months ago

It incorporates the CMakeLists.txt as a subproject, but prior to that it does globally set this define: https://github.com/KhronosGroup/Vulkan-Samples/blob/main/third_party/CMakeLists.txt#L50

MarkCallow commented 6 months ago

Thanks for the info. and this fix.