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

Enable macOS ARM64 build #1130

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,14 @@ if(WIN32)
endif()
else()
set(X86 OFF)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
set(Architecture "arm")
if(DEFINED CMAKE_GENERATOR_PLATFORM AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL "")
set(Architecture "${CMAKE_GENERATOR_PLATFORM}")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
if(APPLE)
set(Architecture "arm64")
else()
set(Architecture "arm")
endif()
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
set(X86 ON)
if(APPLE)
Expand Down
2 changes: 2 additions & 0 deletions codeJK2/game/bg_pmove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6500,7 +6500,9 @@ qboolean PM_SaberLocked( void )
#endif // _DEBUG
gi.G2API_GetBoneAnimIndex( &gent->ghoul2[gent->playerModel], gent->lowerLumbarBone, (cg.time?cg.time:level.time), &currentFrame, &junk, &junk, &junk, &junk2, NULL );

#ifdef _DEBUG
assert(ret); // this would be pretty bad, the below code seems to assume the call succeeds. -gil
#endif // _DEBUG

strength = G_SaberLockStrength( gent );
if ( pm->ps->torsoAnim == BOTH_CCWCIRCLELOCK ||
Expand Down
3 changes: 3 additions & 0 deletions shared/qcommon/q_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
#define idx64
#define ARCH_STRING "x86_64"
#define Q3_LITTLE_ENDIAN
#elif defined(__aarch64__)
#define ARCH_STRING "arm64"
#define Q3_LITTLE_ENDIAN
#endif

#define DLL_EXT ".dylib"
Expand Down