summaryrefslogtreecommitdiff
path: root/win/upgrade_wizard
diff options
context:
space:
mode:
Diffstat (limited to 'win/upgrade_wizard')
-rw-r--r--win/upgrade_wizard/CMakeLists.txt11
1 files changed, 7 insertions, 4 deletions
diff --git a/win/upgrade_wizard/CMakeLists.txt b/win/upgrade_wizard/CMakeLists.txt
index 44d6249ea1e..dc4ef67387d 100644
--- a/win/upgrade_wizard/CMakeLists.txt
+++ b/win/upgrade_wizard/CMakeLists.txt
@@ -16,10 +16,13 @@ IF(NOT MFC_FOUND)
ENDIF()
RETURN()
ENDIF()
-
-# MFC should be statically linked
-SET(CMAKE_MFC_FLAG 1)
-
+IF(MSVC_CRT_TYPE MATCHES "/MD")
+ # MFC should be dynamically linked
+ SET(CMAKE_MFC_FLAG 2)
+ELSE()
+ # MFC should be statically linked
+ SET(CMAKE_MFC_FLAG 1)
+ENDIF()
# Enable exception handling (avoids warnings)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")