Skip to content
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

CMake improvements, add 64-bit support for use in Xash3D FWGS #1053

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

a1batross
Copy link
Contributor

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 keep string_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 becomes cs_arm64.so on Linux ARM64 targets, or cs_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 called libserver.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 with CMAKE_BUILD_TYPE checks instead) and more reliable compiler checks by using CMAKE_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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant