From 5e2485863c02dafbdabda679ea4b92943bc5be80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Wed, 7 Aug 2019 09:39:24 +0200 Subject: [PATCH] Fixed missing copy of qt dll's on msvc using cotire --- ApplicationCode/CMakeLists.txt | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/ApplicationCode/CMakeLists.txt b/ApplicationCode/CMakeLists.txt index cc75e1cab8..8a24b8225b 100644 --- a/ApplicationCode/CMakeLists.txt +++ b/ApplicationCode/CMakeLists.txt @@ -483,13 +483,23 @@ endif() if (MSVC) # Qt DLLs - if (RESINSIGHT_BUILD_WITH_QT5) + if (RESINSIGHT_BUILD_WITH_QT5) message(STATUS "Creating post build step for copying Qt DLLs") - foreach (qtlib ${QT_LIBRARIES}) - add_custom_command(TARGET ResInsight POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $ - ) - endforeach(qtlib) + + foreach (qtlib ${QT_LIBRARIES}) + add_custom_command(TARGET ResInsight POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $ + ) + endforeach(qtlib) + + if (_unityTargetName) + foreach (qtlib ${QT_LIBRARIES}) + add_custom_command(TARGET ${_unityTargetName} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $ + ) + endforeach(qtlib) + endif(_unityTargetName) + else() set (QTLIBLIST QtCore QtGui QtGui QtOpenGl QtNetwork QtScript QtScriptTools) foreach (qtlib ${QTLIBLIST})