diff --git a/CMakeLists.txt b/CMakeLists.txt index 089fe8d627..075489b2be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -284,7 +284,7 @@ add_subdirectory(external/lua/lua) add_subdirectory(external/lua/tolua) # luabinding -add_subdirectory(cocos/scripting/lua) +add_subdirectory(cocos/scripting/lua-bindings) endif(BUILD_LIBS_LUA) # build tests diff --git a/cocos/scripting/lua-bindings/CMakeLists.txt b/cocos/scripting/lua-bindings/CMakeLists.txt index 6cda2e5ad9..d854cdff76 100644 --- a/cocos/scripting/lua-bindings/CMakeLists.txt +++ b/cocos/scripting/lua-bindings/CMakeLists.txt @@ -33,8 +33,8 @@ include_directories( ../../editor-support/cocostudio ../../editor-support/spine ../../gui - ../../../../external/lua/lua - ../../../../external/lua/tolua + ../../../external/lua/lua + ../../../external/lua/tolua ) diff --git a/samples/lua-tests/project/CMakeLists.txt b/samples/lua-tests/project/CMakeLists.txt index db56571304..d17275aed1 100644 --- a/samples/lua-tests/project/CMakeLists.txt +++ b/samples/lua-tests/project/CMakeLists.txt @@ -36,8 +36,9 @@ set_target_properties(${APP_NAME} PROPERTIES pre_build(${APP_NAME} COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}/Resources - COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Resources ${APP_BIN_DIR}/Resources - COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/cocos/scripting/lua/script ${APP_BIN_DIR}/Resources - COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/tests/test-cpp/Resources ${APP_BIN_DIR}/Resources + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../src ${APP_BIN_DIR}/Resources/src + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../res ${APP_BIN_DIR}/Resources + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/cocos/scripting/lua-bindings/script ${APP_BIN_DIR}/Resources + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/samples/cpp-tests/Resources ${APP_BIN_DIR}/Resources ) diff --git a/samples/lua-tests/project/proj.linux/main.cpp b/samples/lua-tests/project/proj.linux/main.cpp new file mode 100644 index 0000000000..e420889600 --- /dev/null +++ b/samples/lua-tests/project/proj.linux/main.cpp @@ -0,0 +1,16 @@ +#include "../Classes/AppDelegate.h" +#include "cocos2d.h" + +#include +#include +#include +#include + +USING_NS_CC; + +int main(int argc, char **argv) +{ + // create the application instance + AppDelegate app; + return Application::getInstance()->run(); +}