nba-emu / NanoBoyAdvance

A cycle-accurate Nintendo Game Boy Advance emulator.
GNU General Public License v3.0
955 stars 53 forks source link

Replace Git submodules with CMake FetchContent #341

Closed GranMinigun closed 6 months ago

GranMinigun commented 7 months ago

Some general build system housekeeping. The primary motivator was to update the outdated libraries (submodules were pointing to commits from December 2020, and with up-to-date fmt NanoBoyAdvance even failed to build). Some bonuses: it's now possible to link with fmt, unarr, and toml11 from repo packages; MSYS2 Clang build now works; Windows executable is now a GUI-class application instead of a console one; cmake --install doesn't throw an error on my Linux system any more and should be usable for Windows and macOS as well.

While submodules could've been updated, it's simpler to maintain FetchContent configurations instead, plus that avoids the classical "forgot to clone submodules" problem. CMake will obtain the sources automatically. Just don't forget to update the target commits before releases.

I've reverted your recent print wrapping commit, as it seems that either updated fmt library or promotion to Windows GUI executable fixed the crash. On the other hand, running from the console doesn't show any logs, likely requiring some other means of seeing them (debugger output?). Letting you know just in case, hopefully it's not much of a deal. Aside from that, nothing exploded right into my face.

fleroviux commented 6 months ago

Thanks a lot!