From 1781d7fa3880ffb6d3062414704fb4d29e9297ad Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Tue, 6 Jan 2009 16:16:38 +0000 Subject: scons: Choose the appropriate MSVC CRT. --- scons/generic.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'scons/generic.py') diff --git a/scons/generic.py b/scons/generic.py index f0bb3de9fc..0ed21a4e6c 100644 --- a/scons/generic.py +++ b/scons/generic.py @@ -458,6 +458,16 @@ def generate(env): env.Append(CFLAGS = cflags) env.Append(CXXFLAGS = cflags) + if env['platform'] == 'windows' and msvc: + # Choose the appropriate MSVC CRT + # http://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx + if env['debug']: + env.Append(CCFLAGS = ['/MTd']) + env.Append(SHCCFLAGS = ['/LDd']) + else: + env.Append(CCFLAGS = ['/MT']) + env.Append(SHCCFLAGS = ['/LD']) + # Assembler options if gcc: if env['machine'] == 'x86': -- cgit v1.2.3