Commits

Mark Palange (Mani)  committed 11ecfcd

EXT-6880 Building updater with static linked CRT

  • Participants
  • Parent commits 02d069f

Comments (0)

Files changed (1)

File indra/win_updater/CMakeLists.txt

 include(LLCommon)
 include(Linking)
 
+# *HACK - override msvcrt implementation (intialized on 00-Common) to be
+# statically linked for the installer this relies on vc taking the last flag on
+# the command line
+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MT")
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
+
 include_directories(
     ${LLCOMMON_INCLUDE_DIRS}
     )
 
 set_target_properties(windows-updater
     PROPERTIES
-    LINK_FLAGS "/NODEFAULTLIB:LIBCMT"
-    LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\""
+    LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
+    LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;MSVCRT\""
     )
 
 # The windows-updater doesn't link against anything non-system, apparently