Replace Git submodules with CMake FetchContent #341
Merged
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.
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.