twnlua: bindgen.py capable of converting share/twn_api.h spec to lua bindings
This commit is contained in:
@@ -8,10 +8,19 @@ endif()
|
||||
|
||||
add_subdirectory($ENV{TWNROOT} $ENV{TWNBUILDDIR})
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/luabind.c
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_SOURCE_DIR}/bindgen.py $ENV{TWNROOT}/share/twn_api.json > ${CMAKE_CURRENT_SOURCE_DIR}/luabind.c
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bindgen.py
|
||||
)
|
||||
|
||||
|
||||
set(SOURCE_FILES
|
||||
game.c
|
||||
state.h
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/luabind.c
|
||||
|
||||
lua/src/lapi.c
|
||||
lua/src/lapi.h
|
||||
lua/src/lauxlib.c
|
||||
|
||||
Reference in New Issue
Block a user