diff --git a/cmake/macros/CopyDllsBesideWindowsExecutable.cmake b/cmake/macros/CopyDllsBesideWindowsExecutable.cmake index b0379e4764..e0558f7a44 100644 --- a/cmake/macros/CopyDllsBesideWindowsExecutable.cmake +++ b/cmake/macros/CopyDllsBesideWindowsExecutable.cmake @@ -10,7 +10,7 @@ # macro(COPY_DLLS_BESIDE_WINDOWS_EXECUTABLE) - if (WIN32) + if (WIN32 AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") # add a post-build command to copy DLLs beside the interface executable add_custom_command( TARGET ${TARGET_NAME}