Some CMake configuring for mangos

This commit is contained in:
Rochet2
2014-09-29 16:27:56 +03:00
parent 98f9ea7b80
commit 5f2a079dc1

View File

@@ -158,24 +158,25 @@ add_library(LuaEngine STATIC
${game_STAT_PCH_SRC}
)
if( WIN32 )
if ( MSVC )
add_custom_command(TARGET LuaEngine
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/lua_scripts/extensions/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/extensions ${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/lua_scripts/extensions/
)
elseif ( MINGW )
add_custom_command(TARGET LuaEngine
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin/lua_scripts/extensions/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/extensions ${CMAKE_BINARY_DIR}/bin/lua_scripts/extensions/
)
endif()
endif()
#if( WIN32 )
# if ( MSVC )
# add_custom_command(TARGET LuaEngine
# POST_BUILD
# COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/lua_scripts/extensions/
# COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/extensions ${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/lua_scripts/extensions/
# )
# elseif ( MINGW )
# add_custom_command(TARGET LuaEngine
# POST_BUILD
# COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin/lua_scripts/extensions/
# COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/extensions ${CMAKE_BINARY_DIR}/bin/lua_scripts/extensions/
# )
# endif()
#endif()
if( UNIX )
install(DIRECTORY extensions DESTINATION bin/lua_scripts/)
elseif( WIN32 )
install(DIRECTORY extensions DESTINATION "${CMAKE_INSTALL_PREFIX}/lua_scripts/")
install(DIRECTORY extensions DESTINATION "${BIN_DIR}/lua_scripts/")
#install(DIRECTORY extensions DESTINATION "${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/lua_scripts/")
endif()