From 7f84c8d60b1265f31aa58bfa4e01739dd279c528 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sat, 15 Mar 2014 10:42:35 -0700 Subject: Patched tolua to understand size_t --- lib/tolua++/src/bin/basic_lua.h | 4 +++- lib/tolua++/src/bin/lua/basic.lua | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/tolua++/src/bin/basic_lua.h b/lib/tolua++/src/bin/basic_lua.h index 9f3b114b4..6adbaa4a6 100644 --- a/lib/tolua++/src/bin/basic_lua.h +++ b/lib/tolua++/src/bin/basic_lua.h @@ -61,6 +61,8 @@ unsigned char lua_basic_lua[] = { 0x3d, 0x20, 0x27, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x27, 0x2c, 0x0a, 0x20, 0x5b, 0x27, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x27, 0x5d, 0x20, 0x3d, 0x20, 0x27, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x27, 0x2c, 0x0a, + 0x20, 0x5b, 0x27, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x74, 0x27, 0x5d, 0x20, + 0x3d, 0x20, 0x27, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x27, 0x2c, 0x0a, 0x20, 0x5b, 0x27, 0x5f, 0x63, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x27, 0x5d, 0x20, 0x3d, 0x20, 0x27, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x27, 0x2c, 0x0a, 0x20, 0x5b, 0x27, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x64, 0x61, @@ -743,4 +745,4 @@ unsigned char lua_basic_lua[] = { 0x5f, 0x69, 0x73, 0x75, 0x73, 0x65, 0x72, 0x74, 0x79, 0x70, 0x65, 0x22, 0x0a, 0x65, 0x6e, 0x64, 0x0a }; -unsigned int lua_basic_lua_len = 8909; +unsigned int lua_basic_lua_len = 8933; diff --git a/lib/tolua++/src/bin/lua/basic.lua b/lib/tolua++/src/bin/lua/basic.lua index f651f1fe6..10cb5b18b 100644 --- a/lib/tolua++/src/bin/lua/basic.lua +++ b/lib/tolua++/src/bin/lua/basic.lua @@ -23,6 +23,7 @@ _basic = { ['unsigned'] = 'number', ['float'] = 'number', ['double'] = 'number', + ['size_t'] = 'number', ['_cstring'] = 'string', ['_userdata'] = 'userdata', ['char*'] = 'string', -- cgit v1.2.3 From 0cfb12f0d11b40d48974177f01494758ed800ff9 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sat, 22 Mar 2014 08:30:49 -0700 Subject: Added Additonal check for xxd existance --- lib/tolua++/CMakeLists.txt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/tolua++/CMakeLists.txt b/lib/tolua++/CMakeLists.txt index 75a301a53..7e7498411 100644 --- a/lib/tolua++/CMakeLists.txt +++ b/lib/tolua++/CMakeLists.txt @@ -7,25 +7,28 @@ include_directories ("${PROJECT_SOURCE_DIR}/include/") include_directories ("${PROJECT_SOURCE_DIR}/../") include_directories ("${PROJECT_SOURCE_DIR}") -if(UNIX) +find_program(XXD_EXECUTABLE xxd) + +if(NOT XXD_EXECUTABLE STREQUAL "xxd-NOTFOUND") add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/src/bin/basic_lua.h - COMMAND xxd -i lua/basic.lua | sed 's/unsigned char/static const unsigned char/g' >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 -i lua/enumerate.lua | sed 's/unsigned char/static const unsigned char/g' >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 -i lua/function.lua | sed 's/unsigned char/static const unsigned char/g' >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 -i lua/declaration.lua | sed 's/unsigned char/static const unsigned char/g' >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) 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) - message(hello) +else() + message("xxd not found, changes to tolua scripts will be ignored") endif() -- cgit v1.2.3 From 83d0c6d6a7358bc18176d4e5432d635f9ffdfd55 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 23 Mar 2014 20:37:23 +0000 Subject: Fixed bad cmake document interpretation Docs say: "If nothing is found, the result will be -NOTFOUND" --- lib/tolua++/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/tolua++/CMakeLists.txt b/lib/tolua++/CMakeLists.txt index 7e7498411..e5c8ce3e8 100644 --- a/lib/tolua++/CMakeLists.txt +++ b/lib/tolua++/CMakeLists.txt @@ -9,7 +9,7 @@ include_directories ("${PROJECT_SOURCE_DIR}") find_program(XXD_EXECUTABLE xxd) -if(NOT XXD_EXECUTABLE STREQUAL "xxd-NOTFOUND") +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/ -- cgit v1.2.3 From eb3cc729d4e367c54a47369f712831908f8da22c Mon Sep 17 00:00:00 2001 From: Samuel Barney Date: Tue, 25 Mar 2014 11:15:05 -0600 Subject: More fixes to get it to compile for me on Mac 10.9. Mostly just newline additions, but some of the unused variables were causing errors, so I wrapped them in #ifndef __APPLE__ calls, since I didn't know if they were going to be used in the future. Also had to undefine TOLUA_TEMPLATE_BIND a couple of times. --- lib/md5/md5.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/md5/md5.h b/lib/md5/md5.h index ad5ad5384..3aa88ac22 100644 --- a/lib/md5/md5.h +++ b/lib/md5/md5.h @@ -90,4 +90,4 @@ private: std::string md5(const std::string & str); -#endif \ No newline at end of file +#endif -- cgit v1.2.3