fix(cmake): fix problem of using LuaJit on OSX(64-bit)
http://luajit.org/install.html If you're building a 64 bit application on OSX which links directly or indirectly against LuaJIT, you need to link your main executable with these flags: -pagezero_size 10000 -image_base 100000000
This commit is contained in:
parent
2e5e5e187f
commit
26afc6cf12
1 changed files with 9 additions and 0 deletions
|
@ -161,6 +161,15 @@ if ("${HAS_LUA_NEWSTATE}$" MATCHES "TRUE")
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D LEAN_USE_LUA_NEWSTATE")
|
||||
endif()
|
||||
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND ${LUA_FOUND} AND
|
||||
"${LUA_INCLUDE_DIR}" MATCHES "jit")
|
||||
# http://luajit.org/install.html
|
||||
# If you're building a 64 bit application on OSX which links
|
||||
# directly or indirectly against LuaJIT, you need to link your main
|
||||
# executable with these flags:
|
||||
set(LEAN_EXTRA_LINKER_FLAGS "${LEAN_EXTRA_LINKER_FLAGS} -pagezero_size 10000 -image_base 100000000")
|
||||
ENDIF()
|
||||
|
||||
include_directories(${LEAN_SOURCE_DIR})
|
||||
|
||||
add_custom_command(
|
||||
|
|
Loading…
Reference in a new issue