fix bug: the project can't compile on windows with vs 2005

- define UPNP_USE_MSVCPP when necessary
- set release build's output directory to be consistent with debug build
- add missing ClientSubscription.c to libupnp project
- reference correct source files in sample project

(backport of commit 0097180ce4)
This commit is contained in:
Raymond Wen 2012-03-08 14:09:28 +08:00 committed by Marcelo Roberto Jimenez
parent e95b4cc53a
commit 4605314569
6 changed files with 256 additions and 255 deletions

View File

@ -103,8 +103,8 @@
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc" AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
PreprocessorDefinitions="WIN32;IXML_INLINE=" PreprocessorDefinitions="WIN32;DEBUG;IXML_INLINE="
RuntimeLibrary="0" RuntimeLibrary="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="true"

View File

@ -50,7 +50,7 @@
Optimization="2" Optimization="2"
InlineFunctionExpansion="1" InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\pthreads\include;..\..\ixml\src\inc;..\..\ixml\inc;..\..\threadutil\inc;..\..\upnp\inc;..\..\upnp\src\inc;..\inc;..\msvc" AdditionalIncludeDirectories="..\..\pthreads\include;..\..\ixml\src\inc;..\..\ixml\inc;..\..\threadutil\inc;..\..\upnp\inc;..\..\upnp\src\inc;..\inc;..\msvc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_SECURE_NO_WARNINGS" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;PTW32_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_SECURE_NO_WARNINGS"
StringPooling="true" StringPooling="true"
RuntimeLibrary="0" RuntimeLibrary="0"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
@ -80,8 +80,8 @@
OutputFile="$(OutDir)\libupnp.dll" OutputFile="$(OutDir)\libupnp.dll"
LinkIncremental="1" LinkIncremental="1"
SuppressStartupBanner="true" SuppressStartupBanner="true"
ProgramDatabaseFile=".\Release/libupnp.pdb" ProgramDatabaseFile="$(OutDir)\libupnp.pdb"
ImportLibrary=".\Release/libupnp.lib" ImportLibrary="$(OutDir)\libupnp.lib"
TargetMachine="1" TargetMachine="1"
/> />
<Tool <Tool
@ -96,7 +96,7 @@
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
SuppressStartupBanner="true" SuppressStartupBanner="true"
OutputFile=".\Release/libupnp.bsc" OutputFile="$(OutDir)\libupnp.bsc"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"

View File

@ -40,7 +40,7 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\ixml\inc;..\..\pthreads\include" AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\ixml\inc;..\..\pthreads\include"
PreprocessorDefinitions="WIN32;DEBUG" PreprocessorDefinitions="WIN32;DEBUG;UPNP_USE_MSVCPP"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="3"
@ -80,9 +80,9 @@
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)" OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="$(ConfigurationName)" IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="1" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >
@ -103,6 +103,8 @@
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\ixml\inc;..\..\pthreads\include"
PreprocessorDefinitions="WIN32;UPNP_USE_MSVCPP"
RuntimeLibrary="2" RuntimeLibrary="2"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="true"
@ -118,18 +120,11 @@
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLibrarianTool"
GenerateDebugInformation="true"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool
Name="VCManifestTool"
/>
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
@ -139,12 +134,6 @@
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />

View File

@ -40,7 +40,7 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvcombo;..\..\upnp\sample\tvcombo\linux" AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvcombo;..\..\upnp\sample\tvcombo\linux"
PreprocessorDefinitions="WIN32;DEBUG" PreprocessorDefinitions="WIN32;DEBUG;UPNP_USE_MSVCPP"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="3"
@ -91,8 +91,8 @@
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)" OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="$(ConfigurationName)" IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="1" ConfigurationType="1"
CharacterSet="2" CharacterSet="2"
WholeProgramOptimization="1" WholeProgramOptimization="1"
@ -114,6 +114,8 @@
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvcombo;..\..\upnp\sample\tvcombo\linux"
PreprocessorDefinitions="WIN32;UPNP_USE_MSVCPP"
RuntimeLibrary="2" RuntimeLibrary="2"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="true"
@ -130,6 +132,8 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="..\..\pthreads\lib\pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;;&quot;out.vc8.$(ConfigurationName)\ixml&quot;;&quot;out.vc8.$(ConfigurationName)\threadutil&quot;;&quot;out.vc8.$(ConfigurationName)\libupnp&quot;"
GenerateDebugInformation="true" GenerateDebugInformation="true"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
@ -174,15 +178,15 @@
> >
</File> </File>
<File <File
RelativePath="..\..\upnp\sample\tvcombo\linux\upnp_tv_combo_main.c" RelativePath="..\..\upnp\sample\linux\tv_combo_main.c"
> >
</File> </File>
<File <File
RelativePath="..\..\upnp\sample\tvcombo\upnp_tv_ctrlpt.c" RelativePath="..\..\upnp\sample\common\tv_ctrlpt.c"
> >
</File> </File>
<File <File
RelativePath="..\..\upnp\sample\tvcombo\upnp_tv_device.c" RelativePath="..\..\upnp\sample\common\tv_device.c"
> >
</File> </File>
</Filter> </Filter>

View File

@ -40,7 +40,7 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt;..\..\upnp\sample\tvctrlpt\linux" AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt;..\..\upnp\sample\tvctrlpt\linux"
PreprocessorDefinitions="WIN32;DEBUG" PreprocessorDefinitions="WIN32;DEBUG;UPNP_USE_MSVCPP"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="3"
@ -91,8 +91,8 @@
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)" OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="$(ConfigurationName)" IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="1" ConfigurationType="1"
CharacterSet="2" CharacterSet="2"
WholeProgramOptimization="1" WholeProgramOptimization="1"
@ -114,6 +114,8 @@
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt;..\..\upnp\sample\tvctrlpt\linux"
PreprocessorDefinitions="WIN32;UPNP_USE_MSVCPP"
RuntimeLibrary="2" RuntimeLibrary="2"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="true"
@ -130,6 +132,8 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="..\..\pthreads\lib\pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;;&quot;out.vc8.$(ConfigurationName)\ixml&quot;;&quot;out.vc8.$(ConfigurationName)\threadutil&quot;;&quot;out.vc8.$(ConfigurationName)\libupnp&quot;"
GenerateDebugInformation="true" GenerateDebugInformation="true"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
@ -174,11 +178,11 @@
> >
</File> </File>
<File <File
RelativePath="..\..\upnp\sample\tvctrlpt\upnp_tv_ctrlpt.c" RelativePath="..\..\upnp\sample\common\tv_ctrlpt.c"
> >
</File> </File>
<File <File
RelativePath="..\..\upnp\sample\tvctrlpt\linux\upnp_tv_ctrlpt_main.c" RelativePath="..\..\upnp\sample\linux\tv_ctrlpt_main.c"
> >
</File> </File>
</Filter> </Filter>

View File

@ -40,7 +40,7 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux" AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux"
PreprocessorDefinitions="WIN32;DEBUG" PreprocessorDefinitions="WIN32;DEBUG;UPNP_USE_MSVCPP"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="3"
@ -91,8 +91,8 @@
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)" OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="$(ConfigurationName)" IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="1" ConfigurationType="1"
CharacterSet="2" CharacterSet="2"
WholeProgramOptimization="1" WholeProgramOptimization="1"
@ -114,6 +114,8 @@
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux"
PreprocessorDefinitions="WIN32;UPNP_USE_MSVCPP"
RuntimeLibrary="2" RuntimeLibrary="2"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="true"
@ -130,6 +132,8 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="..\..\pthreads\lib\pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;;&quot;out.vc8.$(ConfigurationName)\ixml&quot;;&quot;out.vc8.$(ConfigurationName)\threadutil&quot;;&quot;out.vc8.$(ConfigurationName)\libupnp&quot;"
GenerateDebugInformation="true" GenerateDebugInformation="true"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
@ -174,11 +178,11 @@
> >
</File> </File>
<File <File
RelativePath="..\..\upnp\sample\tvdevice\upnp_tv_device.c" RelativePath="..\..\upnp\sample\common\tv_device.c"
> >
</File> </File>
<File <File
RelativePath="..\..\upnp\sample\tvdevice\linux\upnp_tv_device_main.c" RelativePath="..\..\upnp\sample\linux\tv_device_main.c"
> >
</File> </File>
</Filter> </Filter>