Browse Source

copying dlls to executable directory on windows

cl-refactor
ethdev 10 years ago
parent
commit
d439e65fee
  1. 20
      alethzero/CMakeLists.txt

20
alethzero/CMakeLists.txt

@ -85,7 +85,23 @@ if (APPLE)
file(REMOVE \${LINGER_RM})
endif ()
")
else ()
install( TARGETS ${EXECUTEABLE} RUNTIME DESTINATION bin)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
install( TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin)
file (GLOB DLLS ${CMAKE_DEPENDENCY_INSTALL_DIR}/bin/*.dll)
foreach(DLL ${DLLS})
add_custom_command(TARGET ${EXECUTABLE} POST_BUILD
COMMAND cmake -E copy ${DLL} $<TARGET_FILE_DIR:${EXECUTABLE}>
)
endforeach()
add_custom_command(TARGET ${EXECUTABLE} POST_BUILD
COMMAND cmake -E copy_directory
"${CMAKE_DEPENDENCY_INSTALL_DIR}/plugins/platforms"
$<TARGET_FILE_DIR:${EXECUTABLE}>/platforms
)
else()
install( TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin)
endif ()

Loading…
Cancel
Save