2014-03-11 17:56:33 +08:00
|
|
|
set(APP_NAME lua-tests)
|
2014-03-10 17:10:08 +08:00
|
|
|
|
|
|
|
set(SAMPLE_SRC
|
2014-09-10 03:18:31 +08:00
|
|
|
Classes/AppDelegate.cpp
|
|
|
|
Classes/lua_assetsmanager_test_sample.cpp
|
2014-10-10 09:49:25 +08:00
|
|
|
Classes/lua_test_bindings.cpp
|
2014-03-10 17:10:08 +08:00
|
|
|
)
|
|
|
|
|
2014-09-10 03:18:31 +08:00
|
|
|
if(LINUX)
|
|
|
|
set(SAMPLE_SRC
|
|
|
|
${SAMPLE_SRC}
|
|
|
|
proj.linux/main.cpp
|
|
|
|
)
|
|
|
|
elseif(MACOSX)
|
|
|
|
set(SAMPLE_SRC
|
|
|
|
${SAMPLE_SRC}
|
|
|
|
proj.ios_mac/mac/main.cpp
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2014-03-10 17:10:08 +08:00
|
|
|
include_directories(
|
|
|
|
Classes
|
|
|
|
../../../cocos/scripting/lua-bindings/manual
|
|
|
|
../../../cocos/scripting/lua-bindings/auto
|
|
|
|
../../../external/lua/lua
|
|
|
|
../../../external/lua/tolua
|
|
|
|
)
|
|
|
|
|
|
|
|
# add the executable
|
|
|
|
add_executable(${APP_NAME}
|
|
|
|
${SAMPLE_SRC}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(${APP_NAME}
|
2014-08-06 00:15:44 +08:00
|
|
|
luacocos2d
|
|
|
|
cocos2d
|
2014-03-10 17:10:08 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
set(APP_BIN_DIR "${CMAKE_BINARY_DIR}/bin/${APP_NAME}")
|
|
|
|
|
|
|
|
set_target_properties(${APP_NAME} PROPERTIES
|
|
|
|
RUNTIME_OUTPUT_DIRECTORY "${APP_BIN_DIR}")
|
|
|
|
|
|
|
|
pre_build(${APP_NAME}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}/Resources
|
2014-03-11 18:18:19 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../res ${APP_BIN_DIR}/Resources/res
|
2014-03-10 17:39:54 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../src ${APP_BIN_DIR}/Resources/src
|
2014-10-14 21:34:55 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/cocos/scripting/lua-bindings/script/ ${APP_BIN_DIR}/Resources/src/cocos
|
2014-03-11 18:18:19 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/tests/cpp-tests/Resources ${APP_BIN_DIR}/Resources/res
|
2014-03-10 17:10:08 +08:00
|
|
|
)
|
|
|
|
|