From 1cd4bef4db134f579760caf0484affd6f5300289 Mon Sep 17 00:00:00 2001 From: Dmitry Vedenko Date: Mon, 31 May 2021 14:03:24 +0300 Subject: [PATCH] Adds a workaround for Conan issue 8025, affecting libjpeg-turbo compilation on AppleSilicon Macs --- cmake-proxies/cmake-modules/AudacityDependencies.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake-proxies/cmake-modules/AudacityDependencies.cmake b/cmake-proxies/cmake-modules/AudacityDependencies.cmake index 6557287ce..8fad83465 100644 --- a/cmake-proxies/cmake-modules/AudacityDependencies.cmake +++ b/cmake-proxies/cmake-modules/AudacityDependencies.cmake @@ -211,9 +211,14 @@ function ( _conan_install build_type ) conan_cmake_autodetect(settings BUILD_TYPE ${build_type}) if( CMAKE_SYSTEM_NAME MATCHES "Darwin" ) + # TODO: Read the target CPU architecture from the CMake option # We have no AppleSilicon support yet list( APPEND settings "arch=x86_64" ) - list (APPEND settings "os.version=${CMAKE_OSX_DEPLOYMENT_TARGET}") + list( APPEND settings "os.version=${CMAKE_OSX_DEPLOYMENT_TARGET}" ) + # This line is required to workaround the conan bug #8025 + # https://github.com/conan-io/conan/issues/8025 + # Without it, libjpeg-turbo will fail to cross-compile on AppleSilicon macs + list( APPEND settings ENV "CONAN_CMAKE_SYSTEM_PROCESSOR=x86_64") endif() if (build_type MATCHES "MinSizeRel|RelWithDebInfo")