Update CMakeLists.txt, lua-tests works ok on linux now.

This commit is contained in:
James Chen 2014-03-10 02:39:54 -07:00
parent e39dcd9974
commit 479579fadc
4 changed files with 23 additions and 6 deletions

View File

@ -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

View File

@ -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
)

View File

@ -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
)

View File

@ -0,0 +1,16 @@
#include "../Classes/AppDelegate.h"
#include "cocos2d.h"
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string>
USING_NS_CC;
int main(int argc, char **argv)
{
// create the application instance
AppDelegate app;
return Application::getInstance()->run();
}