Skip to content
Snippets Groups Projects
  • Alexandre Janniaux's avatar
    contrib: vulkan-headers: detect current version · 69f935aa
    Alexandre Janniaux authored and Steve Lhomme's avatar Steve Lhomme committed
    Automatically enable the headers, but detect the currently available
    header version with cppcheck since the pkgconfig file will actually
    detect the version of the loader.
    
    cppcheck cannot understand the full header version, which was also not
    available before 1.3 anyway. Moreover, the major and minor versions are
    not defined directly, but instead either through cast or not at all
    (before 1.3), so we use the header guards defines and the
    VK_HEADER_VERSION for the last patch revision number, which directly
    matches the actual package revision.
    
    v1.3.239 is the version provided by the vulkan-loader package on debian
    bookworm, and the main constraint we have is the presence of the
    vulkan/vulkan_beta.h header which should be present and the presence or
    absence of the old/new video_decode extension that was promoted. 238 is
    the first revision removing the previous video_decode extension and
    adding the new one.
    
    Tested on linux with headers present and android with system header
    being obsolete.
    69f935aa