Skip to content

Commit

Permalink
Removed binary tolua.
Browse files Browse the repository at this point in the history
  • Loading branch information
madmaxoft committed May 4, 2017
1 parent e3b59e5 commit 93b6e24
Show file tree
Hide file tree
Showing 15 changed files with 13 additions and 9,820 deletions.
47 changes: 6 additions & 41 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,18 @@ include_directories ("${PROJECT_SOURCE_DIR}/include/")
include_directories ("${PROJECT_SOURCE_DIR}/../")
include_directories ("${PROJECT_SOURCE_DIR}")

find_program(XXD_EXECUTABLE xxd)

if(NOT XXD_EXECUTABLE STREQUAL "XXD_EXECUTABLE-NOTFOUND")
add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/src/bin/basic_lua.h
COMMAND ${XXD_EXECUTABLE} -i lua/basic.lua | sed 's/unsigned char/static const unsigned char/g' >basic_lua.h
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src/bin/
DEPENDS ${PROJECT_SOURCE_DIR}/src/bin/lua/basic.lua)
add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/src/bin/enumerate_lua.h
COMMAND ${XXD_EXECUTABLE} -i lua/enumerate.lua | sed 's/unsigned char/static const unsigned char/g' >enumerate_lua.h
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src/bin/
DEPENDS ${PROJECT_SOURCE_DIR}/src/bin/lua/enumerate.lua)
add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/src/bin/function_lua.h
COMMAND ${XXD_EXECUTABLE} -i lua/function.lua | sed 's/unsigned char/static const unsigned char/g' >function_lua.h
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src/bin/
DEPENDS ${PROJECT_SOURCE_DIR}/src/bin/lua/function.lua)
add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/src/bin/declaration_lua.h
COMMAND ${XXD_EXECUTABLE} -i lua/declaration.lua | sed 's/unsigned char/static const unsigned char/g' >declaration_lua.h
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src/bin/
DEPENDS ${PROJECT_SOURCE_DIR}/src/bin/lua/declaration.lua)
add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/src/bin/container_lua.h
COMMAND ${XXD_EXECUTABLE} -i lua/container.lua | sed 's/unsigned char/static const unsigned char/g' >container_lua.h
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src/bin/
DEPENDS ${PROJECT_SOURCE_DIR}/src/bin/lua/container.lua)
set_property(SOURCE src/bin/toluabind.c APPEND PROPERTY OBJECT_DEPENDS ${PROJECT_SOURCE_DIR}/src/bin/enumerate_lua.h ${PROJECT_SOURCE_DIR}/src/bin/basic_lua.h ${PROJECT_SOURCE_DIR}/src/bin/function_lua.h ${PROJECT_SOURCE_DIR}/src/bin/declaration_lua.h ${PROJECT_SOURCE_DIR}/src/bin/container_lua.h)
else()
message("xxd not found, changes to tolua scripts will be ignored")
endif()


file(GLOB LIB_SOURCE
"src/lib/*.c"
SET (LIB_SOURCE
src/lib/tolua_event.c
src/lib/tolua_is.c
src/lib/tolua_map.c
src/lib/tolua_push.c
src/lib/tolua_to.c
)

file(GLOB BIN_SOURCE
"src/bin/*.c"
)

add_executable(tolua ${BIN_SOURCE})
add_library(tolualib ${LIB_SOURCE})
target_link_libraries(tolualib lua)

if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
add_flags_lnk(-L/usr/local/lib)
endif()

if(UNIX)
target_link_libraries(tolua tolualib lua m ${CMAKE_DL_LIBS})
else()
target_link_libraries(tolua tolualib lua)
endif()
42 changes: 0 additions & 42 deletions INSTALL

This file was deleted.

8 changes: 7 additions & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is tolua++-1.0
This is tolua++-1.0, with changes made by the Cuberite community (*)

* What is tolua++?
tolua++ is an extension of toLua, a tool to integrate C/C++ code with
Expand Down Expand Up @@ -28,3 +28,9 @@ This is tolua++-1.0
tolua++ is maintained by Ariel Manzur.
Send your comments, bug reports and anything else to
tolua@codenix.com



(*) Changes were made to make it easier to incorporate this tool into a cross-
-compiling flow. The binary stub was removed in favor of a pure-Lua
implementation by the caller.
180 changes: 0 additions & 180 deletions SConstruct

This file was deleted.

12 changes: 0 additions & 12 deletions src/bin/SCsub

This file was deleted.

0 comments on commit 93b6e24

Please sign in to comment.