From b96b999c1e542f2814b4dc95e1f08200b7506f6f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias <alam@srb2.org> Date: Sun, 22 May 2016 21:55:55 -0400 Subject: [PATCH] MSVC: Move x86/x64 settings into commons props --- SRB2_Release.props | 2 -- SRB2_common.props | 19 +++++++++++- SRB2_x86.props | 15 ---------- libs/{FMOD_common.props => FMOD.props} | 10 +++++++ libs/FMOD_x64.props | 12 -------- libs/FMOD_x86.props | 12 -------- libs/{SDL2_common.props => SDL2.props} | 0 ...SDL_mixer_common.props => SDL_mixer.props} | 0 libs/{libpng_common.props => libpng.props} | 0 libs/{zlib_common.props => zlib.props} | 0 src/sdl/Srb2SDL-vc10.vcxproj | 27 ++++------------- .../{SRB2SDL_common.props => Srb2SDL.props} | 0 src/win32/Srb2win-vc10.vcxproj | 29 +++---------------- .../{SRB2Win_common.props => Srb2win.props} | 0 14 files changed, 37 insertions(+), 89 deletions(-) delete mode 100644 SRB2_x86.props rename libs/{FMOD_common.props => FMOD.props} (52%) delete mode 100644 libs/FMOD_x64.props delete mode 100644 libs/FMOD_x86.props rename libs/{SDL2_common.props => SDL2.props} (100%) rename libs/{SDL_mixer_common.props => SDL_mixer.props} (100%) rename libs/{libpng_common.props => libpng.props} (100%) rename libs/{zlib_common.props => zlib.props} (100%) rename src/sdl/{SRB2SDL_common.props => Srb2SDL.props} (100%) rename src/win32/{SRB2Win_common.props => Srb2win.props} (100%) diff --git a/SRB2_Release.props b/SRB2_Release.props index 720c3969e3..a216ea45a9 100644 --- a/SRB2_Release.props +++ b/SRB2_Release.props @@ -3,8 +3,6 @@ <ImportGroup Label="PropertySheets" /> <PropertyGroup Label="UserMacros" /> <PropertyGroup> - <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> - <RunCodeAnalysis>true</RunCodeAnalysis> <LinkIncremental>false</LinkIncremental> </PropertyGroup> <ItemDefinitionGroup> diff --git a/SRB2_common.props b/SRB2_common.props index d8bbf5ab21..2fb2eb8c6c 100644 --- a/SRB2_common.props +++ b/SRB2_common.props @@ -3,7 +3,6 @@ <ImportGroup Label="PropertySheets" /> <PropertyGroup Label="UserMacros" /> <PropertyGroup> - <CodeAnalysisRuleSet>MixedMinimumRules.ruleset</CodeAnalysisRuleSet> <OutDir>$(SolutionDir)bin\VC10\$(Platform)\$(Configuration)\</OutDir> <IntDir>$(SolutionDir)objs\VC10\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir> </PropertyGroup> @@ -25,5 +24,23 @@ <GenerateDebugInformation>true</GenerateDebugInformation> </Link> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(PlatformTarget)'=='x86'"> + <ClCompile> + <PreprocessorDefinitions>USEASM;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <Link> + <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> + </Link> + <CustomBuild> + <Command>nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)"</Command> + <Message>Compiling %(Filename).nas with NASM...</Message> + <Outputs>$(IntDir)%(Filename).obj;%(Outputs)</Outputs> + </CustomBuild> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(PlatformTarget)'!='x86'"> + <CustomBuild> + <LinkObjects>false</LinkObjects> + </CustomBuild> + </ItemDefinitionGroup> <ItemGroup /> </Project> \ No newline at end of file diff --git a/SRB2_x86.props b/SRB2_x86.props deleted file mode 100644 index 0ba9d60784..0000000000 --- a/SRB2_x86.props +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ImportGroup Label="PropertySheets" /> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup /> - <ItemDefinitionGroup> - <ClCompile> - <PreprocessorDefinitions>USEASM;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <Link> - <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> - </Link> - </ItemDefinitionGroup> - <ItemGroup /> -</Project> \ No newline at end of file diff --git a/libs/FMOD_common.props b/libs/FMOD.props similarity index 52% rename from libs/FMOD_common.props rename to libs/FMOD.props index 1522adfdc3..785f11ce17 100644 --- a/libs/FMOD_common.props +++ b/libs/FMOD.props @@ -7,5 +7,15 @@ <LibraryPath>$(SolutionDir)libs\fmodex\lib;$(LibraryPath)</LibraryPath> </PropertyGroup> <ItemDefinitionGroup /> + <ItemDefinitionGroup Condition="'$(PlatformTarget)'=='x64'"> + <Link> + <AdditionalDependencies>fmodexL64_vc.lib;%(AdditionalDependencies)</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(PlatformTarget)'=='x86'"> + <Link> + <AdditionalDependencies>fmodexL_vc.lib;%(AdditionalDependencies)</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> <ItemGroup /> </Project> \ No newline at end of file diff --git a/libs/FMOD_x64.props b/libs/FMOD_x64.props deleted file mode 100644 index 80d00d2113..0000000000 --- a/libs/FMOD_x64.props +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ImportGroup Label="PropertySheets" /> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup /> - <ItemDefinitionGroup> - <Link> - <AdditionalDependencies>fmodexL64_vc.lib;%(AdditionalDependencies)</AdditionalDependencies> - </Link> - </ItemDefinitionGroup> - <ItemGroup /> -</Project> \ No newline at end of file diff --git a/libs/FMOD_x86.props b/libs/FMOD_x86.props deleted file mode 100644 index 39e46be4d8..0000000000 --- a/libs/FMOD_x86.props +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ImportGroup Label="PropertySheets" /> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup /> - <ItemDefinitionGroup> - <Link> - <AdditionalDependencies>fmodexL_vc.lib;%(AdditionalDependencies)</AdditionalDependencies> - </Link> - </ItemDefinitionGroup> - <ItemGroup /> -</Project> \ No newline at end of file diff --git a/libs/SDL2_common.props b/libs/SDL2.props similarity index 100% rename from libs/SDL2_common.props rename to libs/SDL2.props diff --git a/libs/SDL_mixer_common.props b/libs/SDL_mixer.props similarity index 100% rename from libs/SDL_mixer_common.props rename to libs/SDL_mixer.props diff --git a/libs/libpng_common.props b/libs/libpng.props similarity index 100% rename from libs/libpng_common.props rename to libs/libpng.props diff --git a/libs/zlib_common.props b/libs/zlib.props similarity index 100% rename from libs/zlib_common.props rename to libs/zlib.props diff --git a/src/sdl/Srb2SDL-vc10.vcxproj b/src/sdl/Srb2SDL-vc10.vcxproj index 452b47ed1d..d12a7efbf8 100644 --- a/src/sdl/Srb2SDL-vc10.vcxproj +++ b/src/sdl/Srb2SDL-vc10.vcxproj @@ -50,21 +50,19 @@ <ImportGroup Label="Shared"> <Import Project="..\..\SRB2_common.props" /> <Import Project="..\..\comptime.props" /> - <Import Project="..\..\libs\zlib_common.props" /> - <Import Project="..\..\libs\libpng_common.props" /> - <Import Project="..\..\libs\SDL2_common.props" /> - <Import Project="..\..\libs\SDL_mixer_common.props" /> - <Import Project="SRB2SDL_common.props" /> + <Import Project="..\..\libs\zlib.props" /> + <Import Project="..\..\libs\libpng.props" /> + <Import Project="..\..\libs\SDL2.props" /> + <Import Project="..\..\libs\SDL_mixer.props" /> + <Import Project="Srb2SDL.props" /> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="..\..\SRB2_Debug.props" /> - <Import Project="..\..\SRB2_x86.props" /> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="..\..\SRB2_Release.props" /> - <Import Project="..\..\SRB2_x86.props" /> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> @@ -222,31 +220,16 @@ <ItemGroup> <CustomBuild Include="..\tmap.nas"> <FileType>Document</FileType> - <Command>nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)"</Command> - <Message>Compiling %(Filename).nas with NASM...</Message> - <Outputs>$(IntDir)%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> </CustomBuild> </ItemGroup> <ItemGroup> <CustomBuild Include="..\tmap_mmx.nas"> <FileType>Document</FileType> - <Command>nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)"</Command> - <Message>Compiling %(Filename).nas with NASM...</Message> - <Outputs>$(IntDir)%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> </CustomBuild> </ItemGroup> <ItemGroup> <CustomBuild Include="..\tmap_vc.nas"> <FileType>Document</FileType> - <Command>nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)"</Command> - <Message>Compiling %(Filename).nas with NASM...</Message> - <Outputs>$(IntDir)%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> </CustomBuild> </ItemGroup> <ItemGroup> diff --git a/src/sdl/SRB2SDL_common.props b/src/sdl/Srb2SDL.props similarity index 100% rename from src/sdl/SRB2SDL_common.props rename to src/sdl/Srb2SDL.props diff --git a/src/win32/Srb2win-vc10.vcxproj b/src/win32/Srb2win-vc10.vcxproj index c57c305a46..1e9d8241ed 100644 --- a/src/win32/Srb2win-vc10.vcxproj +++ b/src/win32/Srb2win-vc10.vcxproj @@ -49,32 +49,26 @@ <ImportGroup Label="Shared"> <Import Project="..\..\SRB2_common.props" /> <Import Project="..\..\comptime.props" /> - <Import Project="..\..\libs\FMOD_common.props" /> - <Import Project="..\..\libs\zlib_common.props" /> - <Import Project="..\..\libs\libpng_common.props" /> - <Import Project="SRB2Win_common.props" /> + <Import Project="..\..\libs\FMOD.props" /> + <Import Project="..\..\libs\zlib.props" /> + <Import Project="..\..\libs\libpng.props" /> + <Import Project="SRB2Win.props" /> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="..\..\SRB2_Debug.props" /> - <Import Project="..\..\SRB2_x86.props" /> - <Import Project="..\..\libs\FMOD_x86.props" /> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="..\..\SRB2_Release.props" /> - <Import Project="..\..\SRB2_x86.props" /> - <Import Project="..\..\libs\FMOD_x86.props" /> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="..\..\SRB2_Debug.props" /> - <Import Project="..\..\libs\FMOD_x64.props" /> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="..\..\SRB2_Release.props" /> - <Import Project="..\..\libs\FMOD_x64.props" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup> @@ -377,27 +371,12 @@ <None Include="..\config.h.in" /> <CustomBuild Include="..\tmap.nas"> <FileType>Document</FileType> - <Command>nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)"</Command> - <Message>Compiling %(Filename).nas with NASM...</Message> - <Outputs>$(IntDir)%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> </CustomBuild> <CustomBuild Include="..\tmap_mmx.nas"> <FileType>Document</FileType> - <Command>nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)"</Command> - <Message>Compiling %(Filename).nas with NASM...</Message> - <Outputs>$(IntDir)%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> </CustomBuild> <CustomBuild Include="..\tmap_vc.nas"> <FileType>Document</FileType> - <Command>nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)"</Command> - <Message>Compiling %(Filename).nas with NASM...</Message> - <Outputs>$(IntDir)%(Filename).obj;%(Outputs)</Outputs> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> </CustomBuild> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> diff --git a/src/win32/SRB2Win_common.props b/src/win32/Srb2win.props similarity index 100% rename from src/win32/SRB2Win_common.props rename to src/win32/Srb2win.props -- GitLab