From 3419e76486752f9fd72fdf390b45485ab4ab9caa Mon Sep 17 00:00:00 2001 From: ayase <137056643@qq.com> Date: Tue, 2 Jun 2020 22:49:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=82=E9=A1=B9=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmake/after_gs_install.cmake | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/cmake/after_gs_install.cmake b/cmake/after_gs_install.cmake index 0ac0155..5dc331d 100644 --- a/cmake/after_gs_install.cmake +++ b/cmake/after_gs_install.cmake @@ -16,19 +16,14 @@ target_link_libraries(game lualib) if( WIN32 ) - if ( MSVC ) - add_custom_command(TARGET game - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/lua_scripts/extensions/" - COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_MOD_ELUNA_ENGINE_DIR}/LuaEngine/extensions" "${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/lua_scripts/extensions/" - ) - elseif ( MINGW ) - add_custom_command(TARGET game - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/bin/lua_scripts/extensions/" - COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_MOD_ELUNA_ENGINE_DIR}/LuaEngine/extensions" "${CMAKE_BINARY_DIR}/bin/lua_scripts/extensions/" - ) + if (MSVC) + set(MSVC_CONFIGURATION_NAME $(ConfigurationName)/) endif() + add_custom_command(TARGET game + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/bin/${MSVC_CONFIGURATION_NAME}lua_scripts/extensions/" + COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_MOD_ELUNA_ENGINE_DIR}/LuaEngine/extensions" "${CMAKE_BINARY_DIR}/bin/${MSVC_CONFIGURATION_NAME}lua_scripts/extensions/" + ) endif() install(DIRECTORY "${CMAKE_MOD_ELUNA_ENGINE_DIR}/LuaEngine/extensions" DESTINATION "${CMAKE_INSTALL_PREFIX}/bin/lua_scripts/")