This commit is contained in:
halx99 2021-10-12 13:16:27 +08:00
parent b99a445519
commit 846231e2f1
3 changed files with 9 additions and 1 deletions

View File

@ -215,7 +215,6 @@ function(cocos_copy_target_dll cocos_target)
add_custom_command(TARGET ${cocos_target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_BINARY_DIR}/bin/\$\(Configuration\)/OpenAL32.dll"
"${CMAKE_BINARY_DIR}/bin/\$\(Configuration\)/plainlua.dll"
$<TARGET_FILE_DIR:${cocos_target}>)
# Copy windows angle binaries
@ -228,6 +227,13 @@ function(cocos_copy_target_dll cocos_target)
)
endfunction()
function(cocos_copy_lua_dlls cocos_target)
add_custom_command(TARGET ${cocos_target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_BINARY_DIR}/bin/\$\(Configuration\)/plainlua.dll"
$<TARGET_FILE_DIR:${cocos_target}>)
endfunction()
# mark `FILES` as resources, files will be put into sub-dir tree depend on its absolute path
function(cocos_mark_resources)
set(oneValueArgs BASEDIR RESOURCEBASE)

View File

@ -161,6 +161,7 @@ if(APPLE)
endif()
elseif(WINDOWS)
cocos_copy_target_dll(${APP_NAME})
cocos_copy_lua_dlls(${APP_NAME})
endif()
# copy resource on linux or WINDOWS
if(WINDOWS)

View File

@ -146,6 +146,7 @@ if(APPLE)
#set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "GRLXXXX2K9")
elseif(WINDOWS)
cocos_copy_target_dll(${APP_NAME})
cocos_copy_lua_dlls(${APP_NAME})
endif()
if(WINDOWS)