-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Isolate VulkanHppGenerator and VideoHppGenerator in CMakeLists.txt #2037
Comments
@M2-TE You mean, something like
and
Would you be so kind and test if that works with your situation? |
That works perfectly well for hiding both targets. As for testing linking against the header target, how is I could open a PR about these if you want |
Would be great! |
That helper function is used with the two libraries generated in this repo: utils and RAII_utils. It just sets up the common stuff for them. |
When adding the vulkan-hpp CMake project (e.g. through FetchContent), people may sometimes want to merely access the headers under
vulkan/
and therefore only need access to the interface library providing the correct include directory:As the submodules are not necessary for this, the VulkanHppGenerator and VideoHppGenerator targets will not be set up properly (even when not used), as the
TINYXML2_SOURCES
are missing, prompting CMake to complain about not knowing what language the target should be in:Vulkan-Hpp/CMakeLists.txt
Lines 366 to 383 in 7527784
Fetching as shown will result in the following error during configuration:
It would be nice if these two targets could be hidden behind an if condition or some function, making this repo a convenient way to fetch a specific header version, rather than always generate the bindings.
The current solution is to set
SOURCE_SUBDIR "disabled"
to disable the cmake configuration for this project and addingvulkan-hpp_SOURCE_DIR
as an include directory, which works but is not as nice as having access to an INTERFACE target, especially when wanting to use the c++20 moduleThe text was updated successfully, but these errors were encountered: