-
Notifications
You must be signed in to change notification settings - Fork 11
Update installation logic to install module files #16
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(sorry I didn't have time to take a look before today)
Looks really good, thanks for taking care of this!
CppModule/CMakeLists.txt
Outdated
@@ -107,4 +107,4 @@ if(${VKFW_BUILD_WITH_VULKAN_MODULE}) | |||
vkfw-module | |||
PRIVATE VKFW_ENABLE_VULKAN_HPP_MODULE | |||
) | |||
endif() | |||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the newline at the end of the file back, please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that! Fixed this in my most recent commit, where I changed the hard-coded relative paths in the vkfw-module target sources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please squash the change into the original commit if it's not too much of a bother.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done and done!
Since there is already some reorganizing happening in this branch, might I propose moving the "include/vkfw/" directory containing the source files up a level to root, and removing the "include/" directory? This pattern can be seen in the project structures for Vulkan_Hpp and glm, and--given that VKFW is now no longer strictly a header-only library--I feel like it might be a bit neater, organizationally. Happy to make the adjustment and update the CMake files if you think it makes sense. |
I agree that it would be better to omit |
Edited vkfw-module target sources to use VKFW_SOURCE_ROOT variable instead of hardcoding the relative paths Moved module file to include directory
66d4149
to
5f7a824
Compare
This is a fair point. I'll confess I think if a user's dependency management is so fragile that a single directory change causes major headaches, I'd encourage them to do some refactoring. That said, it's probably an unnecessary burden to impose on the library's consumers for what is ultimately an aesthetic organizational improvement. Perhaps if there's a future update with breaking changes, it can be implemented then. |
Updates the installation logic to include module files for users who maintain their dependencies using this functionality. Previously, only the .hpp file and library was installed. This also consolidates the .cppm file into the include/vkfw folder (which is the more common layout, and can be seen in libraries like glm and Vulkan_Hpp, which also support modules).
Additionally, this fixes a typo in the CMakeLists.txt file and updates the experimental import std UUID to the latest version.
NOTE: Users who install the library manually or through a dependency manager will still have to create their own vkfw-module library target. However, given that there is not yet a standardized way for distributing shared module libraries this is acceptable (and also allows the user to manage their own Vulkan_Hpp module target, rather than VKFW doing so)