From 4e8e6fa9ce2bfc48ef4920261a95316c783e4b1c Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 19 Jan 2024 16:06:14 +0100 Subject: [PATCH] FindECW.cmake: make it work for Windows 32-bit builds (fixes #9106) --- cmake/modules/packages/FindECW.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cmake/modules/packages/FindECW.cmake b/cmake/modules/packages/FindECW.cmake index 33e6e848eb2c..6b3624fa9faa 100644 --- a/cmake/modules/packages/FindECW.cmake +++ b/cmake/modules/packages/FindECW.cmake @@ -59,13 +59,17 @@ endif() include(FindPackageHandleStandardArgs) if (ECW_VERSION_STRING VERSION_GREATER_EQUAL 5.5) - if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(x86_64|AMD64)") - set(ECW_ARCH x64) - else() - if(WIN32) + if (WIN32) + if (CMAKE_SIZEOF_VOID_P EQUAL 4) set(ECW_ARCH Win32) else() + set(ECW_ARCH x64) + endif() + else() + if (CMAKE_SIZEOF_VOID_P EQUAL 4) set(ECW_ARCH x86) + else() + set(ECW_ARCH x64) endif() endif()