From f77e86a235b228f456452f945287d7620bd683a4 Mon Sep 17 00:00:00 2001
From: Joshua Bowman <silverbacknet@gmail.com>
Date: Tue, 23 Oct 2012 13:12:25 -0700
Subject: [PATCH] Fix MSVC linker warnings

Specify the correct debug runtime libraries for the test
and demo executables to prevent mismatch warnings with
the default runtime.

Signed-off-by: Ralph Giles <giles@mozilla.com>
---
 silk/fixed/silk_fixed.vcxproj  | 3 +++
 src/opus_demo.vcxproj          | 1 +
 tests/test_opus_api.vcxproj    | 1 +
 tests/test_opus_decode.vcxproj | 1 +
 tests/test_opus_encode.vcxproj | 1 +
 5 files changed, 7 insertions(+)

diff --git a/silk/fixed/silk_fixed.vcxproj b/silk/fixed/silk_fixed.vcxproj
index 55c76c247..5c94b30c3 100644
--- a/silk/fixed/silk_fixed.vcxproj
+++ b/silk/fixed/silk_fixed.vcxproj
@@ -75,6 +75,7 @@
       <Optimization>Disabled</Optimization>
       <PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <AdditionalIncludeDirectories>../;../../win32;../../celt;../../include</AdditionalIncludeDirectories>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
@@ -92,6 +93,7 @@
       <Optimization>Disabled</Optimization>
       <PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <AdditionalIncludeDirectories>../;../../win32;../../celt;../../include</AdditionalIncludeDirectories>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
@@ -132,6 +134,7 @@
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <AdditionalIncludeDirectories>../;../../win32;../../celt;../../include</AdditionalIncludeDirectories>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
diff --git a/src/opus_demo.vcxproj b/src/opus_demo.vcxproj
index 4bbea68aa..02a4a31f5 100644
--- a/src/opus_demo.vcxproj
+++ b/src/opus_demo.vcxproj
@@ -73,6 +73,7 @@
       <Optimization>Disabled</Optimization>
       <PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <AdditionalIncludeDirectories>../silk;../celt;../win32;../include;</AdditionalIncludeDirectories>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
     </ClCompile>
     <Link>
       <SubSystem>Console</SubSystem>
diff --git a/tests/test_opus_api.vcxproj b/tests/test_opus_api.vcxproj
index 30ced576e..ca4bcc787 100644
--- a/tests/test_opus_api.vcxproj
+++ b/tests/test_opus_api.vcxproj
@@ -54,6 +54,7 @@
       <Optimization>Disabled</Optimization>
       <PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <AdditionalIncludeDirectories>../silk;../celt;../win32;../include;</AdditionalIncludeDirectories>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
     </ClCompile>
     <Link>
       <SubSystem>Console</SubSystem>
diff --git a/tests/test_opus_decode.vcxproj b/tests/test_opus_decode.vcxproj
index 495f55642..6c8445034 100644
--- a/tests/test_opus_decode.vcxproj
+++ b/tests/test_opus_decode.vcxproj
@@ -54,6 +54,7 @@
       <Optimization>Disabled</Optimization>
       <PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <AdditionalIncludeDirectories>../silk;../celt;../win32;../include;</AdditionalIncludeDirectories>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
     </ClCompile>
     <Link>
       <SubSystem>Console</SubSystem>
diff --git a/tests/test_opus_encode.vcxproj b/tests/test_opus_encode.vcxproj
index 7ed3ac7a0..b3114a6a1 100644
--- a/tests/test_opus_encode.vcxproj
+++ b/tests/test_opus_encode.vcxproj
@@ -54,6 +54,7 @@
       <Optimization>Disabled</Optimization>
       <PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <AdditionalIncludeDirectories>../silk;../celt;../win32;../include;</AdditionalIncludeDirectories>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
     </ClCompile>
     <Link>
       <SubSystem>Console</SubSystem>
-- 
GitLab