-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib/fmt: New library #601
lib/fmt: New library #601
Conversation
This is also part of C++20 so devs would start to expect it afaik? |
libcxx already supports C++20, doesn't it? In that case, this library would be extraneous. :) |
Both DevilutionX and SDL_audiolib use it and we do not plan to migrate to |
Additionally, |
Thanks for the work; however, I think this port should not be a part of the nxdk repository. See:
This PR, for example, has to add a generic rule for *.cc, which probably should not be part of the nxdk build-system. We should go forward with adding better package support or submodule / install dependencies from projects until nxdk has a package manager. Upstreaming of packages is still a good goal of course, so the community benefits from any ports. Adding more packages to nxdk only complicates maintenance of nxdk and makes it harder to create a clean package manager (especially with old projects depending on more and more default packages or even hardcoded paths within nxdk). Packages which should continue to live in nxdk (for now) are drivers (such as pbkit) and low level standard APIs which mimic the OS / userspace APIs (win32 / POSIX / ...). Any API which is purely optional or just implementing logic should be avoided. I consider libfmt such a library. |
Makes sense. NXDK does not implement enough Windows APIs to compile libfmt, so the NXDK-compatible version of libfmt requires some patching. We can switch over to the patched version of libfmt in DevilutionX. Can you fork https://github.com/fmtlib/fmt to XboxDev/fmt and give me access? |
I personally think that it's also fine to keep the libfmt port on a personal account for now. However, I'm mostly inactive, so I'll let other XboxDev maintainers decide. |
We build the NXDK version of DevilutionX multiple times each day, we would be happy to maintain the libfmt port in NXDK and update it as we bump our requirements. |
libfmt no longer requires patching as of fmtlib/fmt#3636 🎉 Only a couple of options need to be set. E.g. when including libfmt as a CMake subproject: set(FMT_OS OFF) # required for nxdk
include(FetchContent)
FetchContent_Declare(libfmt
URL https://github.com/fmtlib/fmt/archive/a8a73da7e44e26d7c18d752976522eff7a21e0bf.tar.gz
URL_HASH MD5=4ddd617a0921e919f1c2e6ab7c36c349
)
FetchContent_MakeAvailable(libfmt)
target_compile_definitions(fmt PUBLIC FMT_WINDOWS_NO_WCHAR) # required for nxdk |
libfmt/fmt requires some patching to make it work on NXDK
I've done the patching in my fork https://github.com/glebm/fmt/tree/nxdk
It'd be better to have the fork be in the XboxDev org but I don't have permissions to set it up (please feel free to do so)
Fixes #594