|
|
@ -44,10 +44,18 @@ macro(eth_add_executable EXECUTABLE) |
|
|
|
endmacro() |
|
|
|
|
|
|
|
macro(eth_copy_dlls EXECUTABLE DLLS) |
|
|
|
add_custom_command(TARGET ${EXECUTABLE} POST_BUILD COMMNAND ${CMAKE_COMMAND} |
|
|
|
-DLIBS="${DLLS}" |
|
|
|
-DCONFIGURATION="$<CONFIGURATION>" |
|
|
|
# dlls must be unsubstitud list variable (without ${}) in format |
|
|
|
# optimized;path_to_dll.dll;debug;path_to_dlld.dll |
|
|
|
list(GET ${DLLS} 1 DLL_RELEASE) |
|
|
|
list(GET ${DLLS} 3 DLL_DEBUG) |
|
|
|
add_custom_command(TARGET ${EXECUTABLE} |
|
|
|
POST_BUILD |
|
|
|
COMMAND ${CMAKE_COMMAND} ARGS |
|
|
|
-DDLL_RELEASE="${DLL_RELEASE}" |
|
|
|
-DDLL_DEBUG="${DLL_DEBUG}" |
|
|
|
-DCONF="$<CONFIGURATION>" |
|
|
|
-DDESTINATION="${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}" |
|
|
|
-P "${ETH_SCRIPTS_DIR}/copydlls.cmake" |
|
|
|
) |
|
|
|
endmacro() |
|
|
|
|
|
|
@ -115,10 +123,7 @@ macro(eth_install_executable EXECUTABLE) |
|
|
|
|
|
|
|
#copy additional dlls |
|
|
|
foreach(dll ${ETH_INSTALL_EXECUTABLE_DLLS}) |
|
|
|
add_custom_command(TARGET ${EXECUTABLE} POST_BUILD |
|
|
|
COMMAND ${CMAKE_COMMAND} |
|
|
|
ARGS -E copy ${dll} "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}" |
|
|
|
) |
|
|
|
eth_copy_dlls(${EXECUTABLE} ${dll}) |
|
|
|
endforeach(dll) |
|
|
|
|
|
|
|
install( TARGETS ${EXECUTABLE} RUNTIME |
|
|
|