Merge branch 'add_custom_command-no-INTERFACE-lib' into release
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
index 07a50b9..7885a0c 100644
--- a/Source/QtDialog/CMakeLists.txt
+++ b/Source/QtDialog/CMakeLists.txt
@@ -28,7 +28,7 @@
     qt5_add_resources(${ARGN})
   endmacro()
   set(CMake_QT_LIBRARIES ${Qt5Widgets_LIBRARIES})
-  set(QT_QTMAIN_LIBRARY Qt5::WinMain)
+  set(QT_QTMAIN_LIBRARY ${Qt5Core_QTMAIN_LIBRARIES})
 
   # Remove this when the minimum version of Qt is 4.6.
   add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0)