File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 22# Lua Native Objects
33#
44
5- find_program (LUA_NATIVE_OBJECTS_EXECUTABLE native_objects.lua
5+ find_program (LUA_NATIVE_OBJECTS_EXECUTABLE native_objects
66 PATHS ${CMAKE_SOURCE_DIR} /../LuaNativeObjects
77 DOC "LuaNativeObjects executable path" )
88set (USE_PRE_GENERATED_BINDINGS TRUE CACHE BOOL
Original file line number Diff line number Diff line change @@ -85,12 +85,15 @@ subfiles {
8585--
8686-- Load parsed libgit2 docs.
8787--
88- local json = require " json"
8988local file = io.open (" docs/libgit2.json" , " r" )
90- local libgit2_docs = json . decode ( file :read (" *a" ) )
89+ local text = file :read (" *a" )
9190file :close ()
92-
93- local lg_funcs = libgit2_docs .functions
91+ local ok , json = pcall (require , " json" )
92+ local lg_funcs = {}
93+ if ok then
94+ local libgit2_docs = json .decode (text )
95+ lg_funcs = libgit2_docs .functions
96+ end
9497
9598-- Copy docs from libgit2
9699reg_stage_parser (" pre_gen" ,{
You can’t perform that action at this time.
0 commit comments