mattiasgustavsson / dos-like

Engine for making things with a MS-DOS feel, but for modern platforms
Other
994 stars 49 forks source link

Fixed NULL undefined in voxel example and added CMakeLists.txt for building all examples #4

Closed nightmareci closed 2 years ago

nightmareci commented 2 years ago

The main thing in this pull request is the added CMakeLists.txt, so the examples can be built with CMake easily, on many platforms. So far, I've only tested it on Linux, but I can test on Windows and macOS too, if issues come up.

mattiasgustavsson commented 2 years ago

The fix for voxel is nice, thanks. The CMakeLists fix though, I don’t think goes with the general philosophy of this project. I’ve taken great care to make the engine and samples very easy to build, and specifically not requiring a powerful build system such as cmake. I do understand that for those familiar with cmake, it would be desirable to use it, but I don’t think I’d want any cmake stuff in this repo. I’d consider some scripts similar to build_all.bat though, for mac and linux. Something which just invokes the compiler with two source files, one for the sample and the dos.c (and the necessary link directives), for each sample. This is also how I build the samples in the github workflow on each commit.