diff --git a/.ci/setup_lua.sh b/.ci/setup_lua.sh index 807f23e8..46c4d706 100644 --- a/.ci/setup_lua.sh +++ b/.ci/setup_lua.sh @@ -49,8 +49,6 @@ if [ "$LUAJIT" == "yes" ]; then if [ "$LUA" == "luajit2.1" ]; then git checkout v2.1; - # force the INSTALL_TNAME to be luajit - perl -i -pe 's/INSTALL_TNAME=.+/INSTALL_TNAME= luajit/' Makefile fi make && make install PREFIX="$LUA_HOME_DIR" diff --git a/CMakeLists.txt b/CMakeLists.txt index 017f0e8f..3a33be48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) if(POLICY CMP0053) cmake_policy(SET CMP0053 NEW) # faster evaluation of variable references diff --git a/deps/luajit b/deps/luajit index 72efc42e..03c31124 160000 --- a/deps/luajit +++ b/deps/luajit @@ -1 +1 @@ -Subproject commit 72efc42ef2258086a9cb797c676e2916b0a9e7e1 +Subproject commit 03c31124cc3b521ef54fe398e10fa55660a5057d diff --git a/deps/luajit.cmake b/deps/luajit.cmake index ca8e132d..0b2616c6 100644 --- a/deps/luajit.cmake +++ b/deps/luajit.cmake @@ -255,9 +255,25 @@ if(MINILUA_USE_LIBM) TARGET_LINK_LIBRARIES(minilua m) endif() +set(GIT_FORMAT %ct) +if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") + set(GIT_FORMAT %%ct) +endif() +add_custom_command(OUTPUT ${LUAJIT_DIR}/src/luajit_relver.txt + COMMAND git show -s --format=${GIT_FORMAT} > ${LUAJIT_DIR}/src/luajit_relver.txt + WORKING_DIRECTORY ${LUAJIT_DIR} +) + +add_custom_command(OUTPUT ${LUAJIT_DIR}/src/luajit.h + COMMAND minilua host/genversion.lua + WORKING_DIRECTORY ${LUAJIT_DIR}/src + DEPENDS ${LUAJIT_DIR}/src/luajit_rolling.h + DEPENDS ${LUAJIT_DIR}/src/luajit_relver.txt +) + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/buildvm_arch.h COMMAND minilua ${LUAJIT_DIR}/dynasm/dynasm.lua ${DASM_FLAGS} -o ${CMAKE_CURRENT_BINARY_DIR}/buildvm_arch.h ${LUAJIT_DIR}/src/vm_${DASM_ARCH}.dasc - DEPENDS ${LUAJIT_DIR}/dynasm/dynasm.lua minilua + DEPENDS ${LUAJIT_DIR}/dynasm/dynasm.lua minilua ${LUAJIT_DIR}/src/luajit.h ) ## Source Lists