mirror of https://github.com/axmolengine/axmol.git
Merge pull request #11853 from joshuastray/fix-resource-path
fix resource path for js-tests
This commit is contained in:
commit
e99b99cc79
|
@ -65,15 +65,22 @@ set(APP_BIN_DIR "${CMAKE_BINARY_DIR}/bin/${APP_NAME}")
|
|||
set_target_properties(${APP_NAME} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${APP_BIN_DIR}")
|
||||
|
||||
|
||||
if(LINUX)
|
||||
set(RES_PREFIX "/Resources")
|
||||
else()
|
||||
set(RES_PREFIX "")
|
||||
endif()
|
||||
|
||||
pre_build(${APP_NAME}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}/script
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}/res
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}/src
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${APP_BIN_DIR}/*.js
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${APP_BIN_DIR}/*.json
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../../cpp-tests/Resources ${APP_BIN_DIR}/res
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../src ${APP_BIN_DIR}/src
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../../../cocos/scripting/js-bindings/script ${APP_BIN_DIR}/script
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../main.js ${APP_BIN_DIR}/main.js
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../project.json ${APP_BIN_DIR}/project.json
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}${RES_PREFIX}/script
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}${RES_PREFIX}/res
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}${RES_PREFIX}/src
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${APP_BIN_DIR}${RES_PREFIX}/*.js
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${APP_BIN_DIR}${RES_PREFIX}/*.json
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../../cpp-tests/Resources ${APP_BIN_DIR}${RES_PREFIX}/res
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../src ${APP_BIN_DIR}${RES_PREFIX}/src
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../../../cocos/scripting/js-bindings/script ${APP_BIN_DIR}${RES_PREFIX}/script
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../main.js ${APP_BIN_DIR}${RES_PREFIX}/main.js
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../project.json ${APP_BIN_DIR}${RES_PREFIX}/project.json
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue