aboutsummaryrefslogtreecommitdiff
path: root/cmake.deps/cmake/BuildLuajit.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake.deps/cmake/BuildLuajit.cmake')
-rw-r--r--cmake.deps/cmake/BuildLuajit.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake.deps/cmake/BuildLuajit.cmake b/cmake.deps/cmake/BuildLuajit.cmake
index cb2e8b9292..554add1c4a 100644
--- a/cmake.deps/cmake/BuildLuajit.cmake
+++ b/cmake.deps/cmake/BuildLuajit.cmake
@@ -66,6 +66,11 @@ if((UNIX AND NOT APPLE) OR (APPLE AND NOT CMAKE_OSX_ARCHITECTURES))
elseif(CMAKE_OSX_ARCHITECTURES AND APPLE)
+ set(LUAJIT_C_COMPILER "${CMAKE_C_COMPILER}")
+ if(CMAKE_OSX_SYSROOT)
+ set(LUAJIT_C_COMPILER "${LUAJIT_C_COMPILER} -isysroot${CMAKE_OSX_SYSROOT}")
+ endif()
+
# Passing multiple `-arch` flags to the LuaJIT build will cause it to fail.
# To get a working universal build, we build each requested architecture slice
# individually then `lipo` them all up.