Skip to content
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

Scons Adding Project Sources/Objects Proposal #37950

Closed
wants to merge 1 commit into from

Conversation

marstaik
Copy link
Contributor

@marstaik marstaik commented Apr 17, 2020

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 example

Benefits:

  • You can explicitly add/remove/hide source files from appearing in the project_sources (which at this point only affect visual studio, but it could be extended for Clion support, or other build systems)
  • Project sources are a separate entity from the object files required to build libraries
  • More explicit SCsub files - You add project_sources, and you add object_files explicitly
  • File globbing isn't built into the old 'add_source_files'

Downsides:

  • More lines in SCsub files (?)

(?) - 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.

@Calinou
Copy link
Member

Calinou commented Jan 20, 2021

Superseded by #45093.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants