mirror of https://github.com/axmolengine/axmol.git
44 lines
1.0 KiB
CMake
44 lines
1.0 KiB
CMake
|
set(APP_NAME testlua)
|
||
|
|
||
|
set(SAMPLE_SRC
|
||
|
proj.linux/main.cpp
|
||
|
Classes/AppDelegate.cpp
|
||
|
)
|
||
|
|
||
|
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}
|
||
|
luabinding
|
||
|
gui
|
||
|
network
|
||
|
cocostudio
|
||
|
cocosbuilder
|
||
|
extensions
|
||
|
audio
|
||
|
cocos2d
|
||
|
)
|
||
|
|
||
|
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
|
||
|
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
|
||
|
)
|
||
|
|