Skip to content
Snippets Groups Projects
Commit fcd84977 authored by Shon Ferguson's avatar Shon Ferguson
Browse files

Changed the default linkage to DLL. You now have to define NIFLIB_STATIC_LINK...

Changed the default linkage to DLL.  You now have to define NIFLIB_STATIC_LINK if you want to use static linking instead of having to define USE_NIFLIB_DLL if you want to use the DLL.
Added a new Debug - DLL configuration.
Static configurations now create either niflib_static.lib or niflib_static_debug.lib, while DLL configurations create niflib_dll.lib and niflib_dll_debug.lib along with niflib.dll and niflib_debug.dll.
parent 012a51f9
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ All rights reserved. Please see niflib.h for licence. */
#endif
// shared library: expose NIFLIB_API objects, hide NIFLIB_HIDDEN objects
#ifdef USE_NIFLIB_DLL
#ifndef NIFLIB_STATIC_LINK
// building swig wrapper
#if defined(SWIG)
#define NIFLIB_API
......
......@@ -4,17 +4,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Niflib", "niflib.vcproj", "
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug - DLL|Win32 = Debug - DLL|Win32
Debug - Static|Win32 = Debug - Static|Win32
Release - DLL|Win32 = Release - DLL|Win32
Release|Win32 = Release|Win32
Release - Static|Win32 = Release - Static|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Debug|Win32.ActiveCfg = Debug|Win32
{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Debug|Win32.Build.0 = Debug|Win32
{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Debug - DLL|Win32.ActiveCfg = Debug - DLL|Win32
{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Debug - DLL|Win32.Build.0 = Debug - DLL|Win32
{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Debug - Static|Win32.ActiveCfg = Debug - Static|Win32
{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Debug - Static|Win32.Build.0 = Debug - Static|Win32
{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - DLL|Win32.ActiveCfg = Release - DLL|Win32
{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - DLL|Win32.Build.0 = Release - DLL|Win32
{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release|Win32.ActiveCfg = Release|Win32
{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release|Win32.Build.0 = Release|Win32
{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - Static|Win32.ActiveCfg = Release - Static|Win32
{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - Static|Win32.Build.0 = Release - Static|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
......@@ -16,7 +16,7 @@
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
Name="Debug - Static|Win32"
OutputDirectory="$(ProjectDir)obj\$(ConfigurationName)"
IntermediateDirectory="$(ProjectDir)obj\$(ConfigurationName)"
ConfigurationType="4"
......@@ -42,7 +42,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="$(ProjectDir)"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
PreprocessorDefinitions="NIFLIB_STATIC_LINK; WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
......@@ -62,7 +62,7 @@
/>
<Tool
Name="VCLibrarianTool"
OutputFile="lib/niflib_debug.lib"
OutputFile="lib/niflib_static_debug.lib"
/>
<Tool
Name="VCALinkTool"
......@@ -81,7 +81,7 @@
/>
</Configuration>
<Configuration
Name="Release|Win32"
Name="Release - Static|Win32"
OutputDirectory="$(ProjectDir)obj\$(ConfigurationName)"
IntermediateDirectory="$(ProjectDir)obj\$(ConfigurationName)"
ConfigurationType="4"
......@@ -109,7 +109,7 @@
Optimization="0"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="$(ProjectDir)"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
PreprocessorDefinitions="NIFLIB_STATIC_LINK; WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
PrecompiledHeaderThrough=""
......@@ -127,7 +127,7 @@
/>
<Tool
Name="VCLibrarianTool"
OutputFile="lib/niflib.lib"
OutputFile="lib/niflib_static.lib"
/>
<Tool
Name="VCALinkTool"
......@@ -173,7 +173,7 @@
Name="VCCLCompilerTool"
Optimization="3"
AdditionalIncludeDirectories="$(ProjectDir)"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BUILDING_NIFLIB_DLL;USE_NIFLIB_DLL"
PreprocessorDefinitions="BUILDING_NIFLIB_DLL;WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
PrecompiledHeaderThrough=""
......@@ -219,6 +219,81 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug - DLL|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="$(ProjectDir)"
PreprocessorDefinitions="BUILDING_NIFLIB_DLL;WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
PrecompiledHeaderThrough=""
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="bin\niflib_debug.dll"
ImportLibrary="lib/niflib_dll_debug.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
......@@ -248,7 +323,15 @@
RelativePath=".\src\niflib.cpp"
>
<FileConfiguration
Name="Debug|Win32"
Name="Debug - Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
PrecompiledHeaderThrough=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug - DLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment