diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-04-03 20:18:34 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-04-03 20:18:34 +0200 |
commit | e1ba51e6ca1cdff477279b7064fc0e0b5117c085 (patch) | |
tree | eaad9f451838b75cd990b548b93f8287fbd75865 /lib | |
parent | Fixed some bugs (diff) | |
parent | Fixed a few MSVC type warnings. (diff) | |
download | cuberite-e1ba51e6ca1cdff477279b7064fc0e0b5117c085.tar cuberite-e1ba51e6ca1cdff477279b7064fc0e0b5117c085.tar.gz cuberite-e1ba51e6ca1cdff477279b7064fc0e0b5117c085.tar.bz2 cuberite-e1ba51e6ca1cdff477279b7064fc0e0b5117c085.tar.lz cuberite-e1ba51e6ca1cdff477279b7064fc0e0b5117c085.tar.xz cuberite-e1ba51e6ca1cdff477279b7064fc0e0b5117c085.tar.zst cuberite-e1ba51e6ca1cdff477279b7064fc0e0b5117c085.zip |
Diffstat (limited to 'lib')
-rw-r--r-- | lib/md5/md5.h | 2 | ||||
-rw-r--r-- | lib/tolua++/CMakeLists.txt | 15 |
2 files changed, 10 insertions, 7 deletions
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 diff --git a/lib/tolua++/CMakeLists.txt b/lib/tolua++/CMakeLists.txt index 75a301a53..e5c8ce3e8 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_EXECUTABLE-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() |