From 728d7216f0da14051988f583b171299ec54a57db Mon Sep 17 00:00:00 2001 From: James Walker Date: Thu, 14 Mar 2024 09:17:58 -0700 Subject: [PATCH] In FreeImage CMakeLists, when building for macOS, include both Arm-specific and Intel-specific sources --- src/FreeImage/CMakeLists.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/FreeImage/CMakeLists.txt b/src/FreeImage/CMakeLists.txt index 8ee0c99c..e88a482e 100644 --- a/src/FreeImage/CMakeLists.txt +++ b/src/FreeImage/CMakeLists.txt @@ -884,7 +884,17 @@ else() ) endif() -if( CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR OGRE_BUILD_PLATFORM_APPLE_IOS ) +if (APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS) + # On macOS, provide sources for both Arm and Intel, + # regardless of CMAKE_SYSTEM_PROCESSOR. + set( FreeImage_SOURCES ${FreeImage_SOURCES} + Source/LibPNG/arm/arm_init.c + Source/LibPNG/arm/filter_neon_intrinsics.c + Source/LibPNG/arm/palette_neon_intrinsics.c + Source/LibPNG/intel/filter_sse2_intrinsics.c + Source/LibPNG/intel/intel_init.c + ) +elseif( CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR OGRE_BUILD_PLATFORM_APPLE_IOS ) set( FreeImage_SOURCES ${FreeImage_SOURCES} Source/LibPNG/arm/arm_init.c Source/LibPNG/arm/filter_neon_intrinsics.c