Compare commits
No commits in common. "630c6fb5d4674db64178dc965c01854162a3f373" and "637343db5b05fcba9257127caa112f763287b2bc" have entirely different histories.
630c6fb5d4
...
637343db5b
@ -305,7 +305,6 @@ function(use_townengine target sources output_directory)
|
||||
endif()
|
||||
|
||||
set_target_properties(${target} PROPERTIES
|
||||
OUTPUT_NAME ${target}
|
||||
LIBRARY_OUTPUT_DIRECTORY ${output_directory}
|
||||
RUNTIME_OUTPUT_DIRECTORY ${output_directory})
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.21)
|
||||
cmake_policy(SET CMP0171 NEW)
|
||||
|
||||
project(twnlua LANGUAGES C)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
@ -8,26 +8,10 @@ endif()
|
||||
|
||||
add_subdirectory($ENV{TWNROOT} $ENV{TWNROOT}/build)
|
||||
|
||||
set(FLAGS
|
||||
$<$<NOT:$<BOOL:${TWN_FEATURE_DYNLIB_GAME}>>:--no-dynlib-game>
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/luabind.c
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_SOURCE_DIR}/bindgen.py $ENV{TWNROOT}/share/twn_api.json ${FLAGS} > ${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 $ENV{TWNROOT}/share/twn_api.json
|
||||
CODEGEN
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_SOURCE_DIR}/data/scripts/twnapi.lua
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_SOURCE_DIR}/docgen.py $ENV{TWNROOT}/share/twn_api.json > ${CMAKE_SOURCE_DIR}/data/scripts/twnapi.lua
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/docgen.py $ENV{TWNROOT}/share/twn_api.json
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
twnlua_docgen ALL
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/data/scripts/twnapi.lua
|
||||
)
|
||||
|
||||
add_compile_definitions(LUA_32BITS)
|
||||
@ -39,4 +23,5 @@ set(SOURCE_FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/luabind.c
|
||||
)
|
||||
|
||||
use_townengine(${CMAKE_PROJECT_NAME} "${SOURCE_FILES}" ${CMAKE_SOURCE_DIR})
|
||||
|
||||
use_townengine(${PROJECT_NAME} "${SOURCE_FILES}" ${CMAKE_SOURCE_DIR})
|
||||
|
@ -64,8 +64,8 @@ def from_table(typedesc, variable, indent = 0):
|
||||
|
||||
|
||||
print('#include "twn_game_api.h"\n')
|
||||
if not "--no-dynlib-game" in sys.argv:
|
||||
print('#define STB_DS_IMPLEMENTATION')
|
||||
# TODO: reuse implementation from the engine, this also breaks with statically compiled build
|
||||
print('#define STB_DS_IMPLEMENTATION')
|
||||
print('#include <stb_ds.h>')
|
||||
print('#include "minilua.h"\n')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user