2013-11-04 18:48:36 +08:00
|
|
|
set(APP_NAME testlua)
|
2013-11-02 19:14:29 +08:00
|
|
|
|
|
|
|
set(SAMPLE_SRC
|
|
|
|
proj.linux/main.cpp
|
|
|
|
Classes/AppDelegate.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
Classes
|
|
|
|
../../../cocos/scripting/lua/bindings
|
|
|
|
../../../external/lua/lua
|
|
|
|
../../../external/lua/tolua
|
|
|
|
)
|
|
|
|
|
|
|
|
# add the executable
|
2013-11-04 18:48:36 +08:00
|
|
|
add_executable(${APP_NAME}
|
2013-11-02 19:14:29 +08:00
|
|
|
${SAMPLE_SRC}
|
|
|
|
)
|
|
|
|
|
2013-11-04 18:48:36 +08:00
|
|
|
target_link_libraries(${APP_NAME}
|
2013-11-02 19:14:29 +08:00
|
|
|
luabinding
|
|
|
|
gui
|
|
|
|
network
|
|
|
|
cocostudio
|
|
|
|
cocosbuilder
|
|
|
|
extensions
|
2013-11-04 13:10:04 +08:00
|
|
|
audio
|
|
|
|
cocos2d
|
2013-11-02 19:14:29 +08:00
|
|
|
)
|
|
|
|
|
2013-11-04 18:48:36 +08:00
|
|
|
set(APP_BIN_DIR "${CMAKE_SOURCE_DIR}/bin/${APP_NAME}")
|
2013-11-02 19:14:29 +08:00
|
|
|
|
2013-11-04 18:48:36 +08:00
|
|
|
set_target_properties(${APP_NAME} PROPERTIES
|
|
|
|
RUNTIME_OUTPUT_DIRECTORY "${APP_BIN_DIR}")
|
2013-11-02 19:14:29 +08:00
|
|
|
|
2013-11-06 10:55:39 +08:00
|
|
|
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}/samples/Cpp/TestCpp/Resources ${APP_BIN_DIR}/Resources
|
2013-11-04 18:48:36 +08:00
|
|
|
)
|
2013-11-02 19:14:29 +08:00
|
|
|
|