Skip to content

Commit b762501

Browse files
committed
Support newer Lua versions.
1 parent 7138232 commit b762501

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

CMakeLists.txt

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# Lua bindings for libgit2
33
#
4-
cmake_minimum_required(VERSION 2.8)
4+
cmake_minimum_required(VERSION 3.18)
55

66
project(lua-git2 C)
77

@@ -10,16 +10,14 @@ set(BUILD_SHARED_LIBS TRUE)
1010
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
1111

1212
set(INSTALL_CMOD share/lua/cmod CACHE PATH "Directory to install Lua binary modules (configure lua via LUA_CPATH)")
13-
set(USE_PRE_GENERATED_BINDINGS TRUE CACHE BOOL
14-
"Set this to FALSE to re-generate bindings using LuaNativeObjects")
1513

1614
set(COMMON_CFLAGS "${CFLAGS}")
1715
set(COMMON_LIBS)
1816

19-
## Lua 5.1.x
20-
include(FindLua51)
21-
if(NOT ${LUA51_FOUND})
22-
message(FATAL_ERROR "The FindLua51 module could not find lua :-(")
17+
## Lua 5.x
18+
include(FindLua)
19+
if(NOT ${LUA_FOUND})
20+
message(FATAL_ERROR "The FindLua module could not find lua :-(")
2321
endif()
2422
set(COMMON_LIBS "${COMMON_LIBS};${LUA_LIBRARIES}")
2523
include_directories(${LUA_INCLUDE_DIR})

0 commit comments

Comments
 (0)