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 building for Windows ARM64 #1131

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Next Next commit
Allow ARM64 on Windows
  • Loading branch information
JunielKatarn committed Dec 18, 2022
commit ecda78666d14e5d791567b9b8cb5a588f77bccd7
16 changes: 11 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -43,9 +43,9 @@ option(BuildSPEngine "Whether to create projects for the SP engine (openjk_sp.ex
option(BuildSPGame "Whether to create projects for the SP gamecode (jagamex86.dll)" ON)
option(BuildSPRdVanilla "Whether to create projects for the SP default renderer (rdsp-vanilla_x86.dll)" ON)

option(BuildJK2SPEngine "Whether to create projects for the jk2 SP engine (openjo_sp.exe)" OFF)
option(BuildJK2SPGame "Whether to create projects for the jk2 sp gamecode mod (jk2gamex86.dll)" OFF)
option(BuildJK2SPRdVanilla "Whether to create projects for the jk2 sp renderer (rdjosp-vanilla_x86.dll)" OFF)
option(BuildJK2SPEngine "Whether to create projects for the jk2 SP engine (openjo_sp.exe)" ON)
option(BuildJK2SPGame "Whether to create projects for the jk2 sp gamecode mod (jk2gamex86.dll)" ON)
option(BuildJK2SPRdVanilla "Whether to create projects for the jk2 sp renderer (rdjosp-vanilla_x86.dll)" ON)

option(BuildTests "Whether to build automatic unit tests (requires Boost)" OFF)

@@ -103,11 +103,17 @@ list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake/Modules")
# and is used in DLL names (jagamex86.dll, jagamex86.dylib, jagamei386.so).
if(WIN32)
set(X86 ON)
if(CMAKE_SIZEOF_VOID_P MATCHES "8")
if(DEFINED CMAKE_GENERATOR_PLATFORM)
set(Architecture "${CMAKE_GENERATOR_PLATFORM}")
elseif(CMAKE_SIZEOF_VOID_P MATCHES "8")
set(Architecture "x86_64")
set(WIN64 TRUE)
else()
set(Architecture "x86")
endif()

if(Architecture EQUAL "x86_64")
set(WIN64 TRUE)
elseif(Architecture EQUAL "x86")
set(WIN64 FALSE)
endif()
else()