CMake improvements, add 64-bit support for use in Xash3D FWGS #1053
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.
This is my attempt to finally upstream Xash related changes to ReGameDLL_CS, mostly much cleaner than everything that was used before.
In Xash3D FWGS we support 64-bit targets, but it requires a bit of work from game's side, mainly to resolve
string_t
issues. Engine provides a string pool with deduplication mechanism, to keepstring_t
32-bit.Not only that, to allow binaries installed and distributed for multiple platforms, we add a carefully encoded suffix at the end of the binary name. The engine expects it and only looks for properly named binaries, so
cs.so
becomescs_arm64.so
on Linux ARM64 targets, orcs_freebsd_riscv64d.so
on 64-bit FreeBSD RISC-V with double float precision. Android is the only exception here, as mismatching CPU architecture and ABI is nearly impossible there, and server game libraries are calledlibserver.so
there.Along with it, it also adds some improvements to the
CMakeLists.txt
, mainly disabling strip if we're compiling in debug mode (which should probably be replaced withCMAKE_BUILD_TYPE
checks instead) and more reliable compiler checks by usingCMAKE_CXX_COMPILER_ID
provided by CMake itself.Changes to properly support non-x86 targets will follow up later.
Thank you all for this impressive project.