RandyGaul / cute_framework

The *cutest* framework out there for creating 2D games in C++!
https://randygaul.github.io/cute_framework/#/
Other
534 stars 31 forks source link

Modular cmakelists #179

Closed pusewicz closed 2 months ago

pusewicz commented 2 months ago

@RandyGaul Hey Randy, inspired by this post about CMake, I went ahead and restructured the CMake configuration. The main takeaways are:

The upside here is that the main CMakeLists.txt is now smaller and easier to parse (although I still think it could become even simpler) and that Cute would not even attempt to build the tests and samples unless needed.

The downside is that, well, the config is now split across multiple files, so it's necessary to know which one to edit to make changes.

Please let me know if this is a change you'd like merged, any changes you'd like to see made or close it if this is not something you see useful. Thanks!

Remaining todo:

RandyGaul commented 2 months ago

I do feel like a single cmake file is a little easier to maintain and slightly simpler. Is it possible to keep any improvements you've made while also keeping a single cmake file? If so, could you re-summarize what the benefits are after refactoring back to a single cmake file?

Thanks for taking the time to think about how to improve CF!

pusewicz commented 2 months ago

@RandyGaul It absolutely is possible to get those benefits. I'll work on that and rebase the branch.

One thing that's currently annoying is that the failing commands on Windows builds do not mark the build as... failed. Not sure why that is.