When building with VOLK_INSTALL (and no other options), the behavior is a little odd:
In addition to include/volk.h and lib/libvolk.a (that make sense), we also install include/volk.c.
On one hand, this is unusual - this is not how most libraries work, and if you link to libvolk.a you never need volk.c.
On the other hand, I think this was added to support header-only mode so that instead of linking to libvolk.a you could instead define VOLK_IMPLEMENTATION and use volk like a stb-style header library. Additionally, I believe Vulkan SDK currently packages volk sources but not volk build artifacts due to some complexity in the SDK build process.
I'm considering changing this so that volk.c is only installed when VOLK_HEADERS_ONLY is defined, as I believe these came in the same PR (#34). I want to double check that this would be consistent with how people expect to use volk, and that it won't conflict with the SDK build process. Additionally I would probably want to change VOLK_HEADERS_ONLY so that it doesn't force static library build when VOLK_INSTALL is defined. So after this you could:
- Build with VOLK_INSTALL=ON, and get volk.h, libvolk.a as your install targets (as well as some CMake modules)
- Build with VOLK_INSTALL=ON VOLK_HEADERS_ONLY=ON, and get volk.h, volk.c as your install targets (as well as some CMake modules)
cc @jeweg (as the author of the original PR) and @johnzupin to make sure this will not interfere with Vulkan SDK build/packaging.
When building with VOLK_INSTALL (and no other options), the behavior is a little odd:
In addition to
include/volk.handlib/libvolk.a(that make sense), we also installinclude/volk.c.On one hand, this is unusual - this is not how most libraries work, and if you link to
libvolk.ayou never needvolk.c.On the other hand, I think this was added to support header-only mode so that instead of linking to
libvolk.ayou could instead defineVOLK_IMPLEMENTATIONand use volk like a stb-style header library. Additionally, I believe Vulkan SDK currently packages volk sources but not volk build artifacts due to some complexity in the SDK build process.I'm considering changing this so that
volk.cis only installed whenVOLK_HEADERS_ONLYis defined, as I believe these came in the same PR (#34). I want to double check that this would be consistent with how people expect to use volk, and that it won't conflict with the SDK build process. Additionally I would probably want to change VOLK_HEADERS_ONLY so that it doesn't force static library build when VOLK_INSTALL is defined. So after this you could:cc @jeweg (as the author of the original PR) and @johnzupin to make sure this will not interfere with Vulkan SDK build/packaging.