Scons Adding Project Sources/Objects Proposal #37950
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I spent some time trying to solve the issue with header files not appearing in Visual Studio in PR #34416, but after further investigation I found the solution to be "dirty", as it was solving the issue in a way that really didn't make sense.
This PR is more of a "demo" of changes I would like to propose to how the project file tracking and object file generation for godot libs are handled, as in my opinion they were very unclear (it took me a while to figure out how everything works together), and it seems like the current way the files for Windows Visual Studio project files being discovered was really a band-aid.
I say "band-aid" because the way the "Project Files" were determined before was from modifying the resulting generated .obj's by scons and adding in the .cpp and .h files manually if they existed, missing many headers entirely.
This PR Demo attempts to solve the Visual Studio header files by introducing some more structure to how object files are generated for libs, and separating out the "project sources" from the required object files required for building libraries.
I applied the functionality to
core
as an exampleBenefits:
Downsides:
(?) - Figuring out some method of adding in header files for vs projects would result in some additional SCsub length overhead anyways, so I really don't think this is much of an issue.