clarify logic for selecting 32 vs 64 bit

develop
Myk Taylor 2022-12-10 18:13:19 -08:00
parent e5f0668afd
commit 2ef36b9ccc
No known key found for this signature in database
1 changed files with 3 additions and 3 deletions

@ -102,10 +102,10 @@ endif()
# Automatically detect architecture based on Visual Studio generator # Automatically detect architecture based on Visual Studio generator
if(MSVC AND NOT DEFINED DFHACK_BUILD_ARCH) if(MSVC AND NOT DEFINED DFHACK_BUILD_ARCH)
if(${CMAKE_GENERATOR} MATCHES "Win64") if ((${CMAKE_GENERATOR} MATCHES "Win32") OR (${CMAKE_GENERATOR} MATCHES "x86"))
set(DFHACK_BUILD_ARCH "64")
else()
set(DFHACK_BUILD_ARCH "32") set(DFHACK_BUILD_ARCH "32")
else()
set(DFHACK_BUILD_ARCH "64")
endif() endif()
else() else()
set(DFHACK_BUILD_ARCH "64" CACHE STRING "Architecture to build ('32' or '64')") set(DFHACK_BUILD_ARCH "64" CACHE STRING "Architecture to build ('32' or '64')")