From a9a54aed2fb91351c0aeefcedd887b90969f3fc1 Mon Sep 17 00:00:00 2001 From: mio Date: Fri, 8 Mar 2024 17:28:46 +0800 Subject: [PATCH] Fix for xcode build --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b92435a8..2cffc0fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -292,6 +292,10 @@ else() if (ATOMIC_LINKAGE_FIX) set (EXTRA_CFLAGS "${EXTRA_CFLAGS} -latomic") endif() + if (CMAKE_OSX_SYSROOT) + # https://github.com/unicorn-engine/unicorn/issues/1917 + set (EXTRA_CFLAGS "${EXTRA_CFLAGS} -isysroot ${CMAKE_OSX_SYSROOT} ") + endif() set(TARGET_LIST "--target-list=") if(UNICORN_HAS_X86)