From 90f8799065ef8392508839087408430151f75254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 2 Dec 2020 22:46:56 +0100 Subject: [PATCH] Safer hack to build on M1. --- CMakeLists.txt | 11 ++++++++--- cmake/{Modules => sdl}/FindSDL2.cmake | 0 2 files changed, 8 insertions(+), 3 deletions(-) rename cmake/{Modules => sdl}/FindSDL2.cmake (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 64cbce22a4..0a5fceb50b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,6 @@ if(NOT ANDROID) endif() enable_language(ASM) -list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) add_definitions(-D__STDC_CONSTANT_MACROS) @@ -61,8 +60,6 @@ if(CMAKE_SYSTEM_PROCESSOR) endif() endif() -include(ccache) - # the libraries in the ffmpeg/ directory are not compatible with mingw if(MINGW AND NOT DEFINED USE_SYSTEM_FFMPEG) set(USE_SYSTEM_FFMPEG ON) @@ -93,6 +90,14 @@ if(ANDROID OR WIN32 OR (UNIX AND NOT ARM_NO_VULKAN)) set(VULKAN ON) endif() +list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) +if(NOT (ARM64 AND MACOSX)) + list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/sdl) +endif() + +include(ccache) + + if(GOLD) add_definitions(-DGOLD) message("Gold Build") diff --git a/cmake/Modules/FindSDL2.cmake b/cmake/sdl/FindSDL2.cmake similarity index 100% rename from cmake/Modules/FindSDL2.cmake rename to cmake/sdl/FindSDL2.cmake