tomatenquark / code

The code that powers Tomatenquark
https://tomatenquark.github.io/
Other
34 stars 5 forks source link

Refactor build system #22

Closed Fohlen closed 4 years ago

Fohlen commented 4 years ago

The current build system does not support adding 3rd party dependencies easily. I would like to refactor the build system with the following specification in mind:

stephanlachnit commented 4 years ago

What about Meson? Meson is fast, prettier than CMake and works with both XCode and Visual Studio. After taking a look at the Makefile, it doesn't look too hard. Maybe I'll give it a try.

Fohlen commented 4 years ago

Hey @stephanlachnit I'm all open for ideas. Honestly I'm not very involved with build systems and if somebody has knowledge around bazel or Meson I'm very glad.

Bear in mind this is (I believe) a large task because:

Ideally this issue removes binary files from the repository. If you think this sounds like a task for you I'd be delighted to see a PR! If you need further help let me know here or on our Discord.

All the best

stephanlachnit commented 4 years ago

Please not Bazel as contributing requires signing a CLA.

The good thing about Meson that is has a dependency tool called wrap. Basically you don't need to copy Zlib etc, Meson will download it for you if it's missing.

Meson itself is written OS neutral, i.e. you don't call gcc itself, Meson will decide which compiler to use (ofc you can still specify it if you want).

I can take a look into it, but right now I'm short on time.

Calinou commented 4 years ago

One issue with Meson's wrap system is that it seems to have much less adoption compared to vcpkg, which integrates with CMake. That said, I'm fine with using Meson.

stephanlachnit commented 4 years ago

That's true. There is a WrapDB entry for SDL2 and Zlib, but not for example SDL2 image and SDL2 mixer. That being said, I think CMake is pretty ugly and I rather write Meson files for these projects than working with CMake.

Fohlen commented 4 years ago

While tampering with the SteamWorks SDK I have noticed that prioritising this is unavoidable (as otherwise the number of VS and XCode projects explodes).

What is left to do:

Fohlen commented 4 years ago

The updated system uses CMake + vcpkg and runs on all three platforms. Hooray to that. Will soon draft a PR to close this ticket.