Skip to content

Commit 309f8dd

Browse files
committed
🛠️ LuaJIT modifications
1 parent 620c9ae commit 309f8dd

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

cmake/Packages/FindLuaBuild/LuaJIT.cmake

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ else()
283283
if (WIN32)
284284
list(APPEND LUA_JIT_MAKE_BUILD_MODIFICATIONS "HOST_SYS=Windows" "TARGET_SYS=Windows" "TARGET_AR=ar rcus")
285285
endif()
286-
list(APPEND LUA_JIT_MAKE_BUILD_MODIFICATIONS $<$<CONFIG:Debug>:"CCDEBUG= -g">)
286+
list(APPEND LUA_JIT_MAKE_BUILD_MODIFICATIONS $<$<CONFIG:Debug>:"CCDEBUG=-g">)
287287
if (BUILD_LUA_52_COMPATIBILITY)
288288
list(APPEND LUA_JIT_MAKE_XCFLAGS_MODIFICATIONS "-DLUAJIT_ENABLE_LUA52COMPAT")
289289
endif()
@@ -295,6 +295,16 @@ else()
295295
list(APPEND LUA_JIT_MAKE_BUILD_MODIFICATIONS "TARGET_CFLAGS=${LUA_JIT_MAKE_TARGET_CFLAGS_MODIFICATIONS}")
296296
list(APPEND LUA_JIT_MAKE_BUILD_MODIFICATIONS "HOST_CFLAGS=${LUA_JIT_MAKE_HOST_CFLAGS_MODIFICATIONS}")
297297
set(LUA_JIT_MAKE_COMMAND "${MAKE_PROGRAM}" ${LUA_JIT_MAKE_BUILD_MODIFICATIONS})
298+
if (APPLE)
299+
if (CMAKE_OSX_DEPLOYMENT_TARGET)
300+
set(MACOS_SDK_TARGET ${CMAKE_MACOSX_DEPLOYMENT_TARGET})
301+
elseif (MACOSX_DEPLOYMENT_TARGET)
302+
set(MACOS_SDK_TARGET ${MACOSX_DEPLOYMENT_TARGET})
303+
endif()
304+
if (MACOS_SDK_TARGET)
305+
set(LUA_JIT_MAKE_COMMAND MACOSX_DEPLOYMENT_TARGET=${MACOS_SDK_TARGET} ${LUA_JIT_MAKE_COMMAND})
306+
endif()
307+
endif()
298308
endif()
299309

300310
set(LUA_JIT_BUILD_COMMAND BUILD_COMMAND ${LUA_JIT_MAKE_COMMAND})

0 commit comments

Comments
 (0)