Use default cmake output paths #3572
Open
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.
Overriding the global
CMAKE_RUNTIME_OUTPUT_DIRECTORYvariable so that every binary goes into the same folder is intrusive, unintuitive, and can cause a variety of unnecessary complicationsMy understanding is this was only done so that windows dlls can be loaded for the examples/tests, but it's simple enough to do that in a target and platform specific way that leaves the standard output structure untouched.
Had to modify the mesa3d stuff to accommodate this, which also removed the functionality to remove the mesa3d dlls when disabling the option, but given it's just a workaround for CI jobs (where this behaviour would never be used) I think the impact of this is negligible - I could make it work with some more hacks but in my opinion it's not worth it for something that maintaners/developers may only do once in a blue moon (you can just do a clean build instead when disabling the option)
A big motivation for this is mobile/console ports, where the output is often more than just a simple binary, and involves specific folder structures that are difficult (or impossible) to manage when every target is trying to work with the same output folder