Skip to content

Commit 05909f7

Browse files
committed
* Fix architecture detection order in CMakeLists.txt to prioritize amd64 over i386
1 parent 5e4a68e commit 05909f7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ endif()
4848
# Fallback to CMAKE_SYSTEM_PROCESSOR if ARCH_DIR is not set
4949
if(NOT DEFINED ARCH_DIR)
5050
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" CMAKE_SYSTEM_PROCESSOR_LC)
51-
if(CMAKE_SYSTEM_PROCESSOR_LC MATCHES "i386|i686|x86")
52-
set(ARCH_DIR "i386")
53-
elseif(CMAKE_SYSTEM_PROCESSOR_LC MATCHES "x86_64|amd64")
51+
if(CMAKE_SYSTEM_PROCESSOR_LC MATCHES "x86_64|amd64")
5452
set(ARCH_DIR "amd64")
5553
elseif(CMAKE_SYSTEM_PROCESSOR_LC MATCHES "aarch64|arm64")
5654
set(ARCH_DIR "arm64")
55+
elseif(CMAKE_SYSTEM_PROCESSOR_LC MATCHES "i386|i686|x86")
56+
set(ARCH_DIR "i386")
5757
else()
5858
message(FATAL_ERROR "Unsupported architecture: ${CMAKE_SYSTEM_PROCESSOR}")
5959
endif()

0 commit comments

Comments
 (0)