From 08769ec35edbee5d34065aec81caa231571ce6f3 Mon Sep 17 00:00:00 2001 From: Ben Doherty Date: Wed, 12 May 2021 11:15:10 -0700 Subject: [PATCH] Fix DIST_DIR setting for Windows builds (#3945) --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 89afefe30a..aa51851bf2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -449,11 +449,15 @@ if (NOT DIST_ARCH) if (CMAKE_OSX_ARCHITECTURES MATCHES ".*;.*") set(DIST_ARCH "universal") else() - if (NOT CMAKE_OSX_ARCHITECTURES STREQUAL "") + if (NOT "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "") set(DIST_ARCH "${CMAKE_OSX_ARCHITECTURES}") endif() endif() + endif() +# On Windows machines, the host processor is set to 'AMD64', which we'll interpret as x86_64. +string(TOLOWER "${DIST_ARCH}" DIST_ARCH) +string(REPLACE "amd64" "x86_64" DIST_ARCH "${DIST_ARCH}") if (NOT DIST_DIR) set(DIST_DIR "${DIST_ARCH}") endif()