Small improvement.

This commit is contained in:
LoRd_MuldeR 2022-12-31 14:54:24 +01:00
parent 4f29082f16
commit 059d4e629a
4 changed files with 38 additions and 5 deletions

View File

@ -62,13 +62,13 @@
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<OutDir>$(ProjectDir)\lib\</OutDir> <OutDir>$(ProjectDir)\lib\</OutDir>
<IntDir>$(ProjectDir)\obj\$(Configuration)\$(Platform)\</IntDir> <IntDir>$(ProjectDir)\obj\$(Configuration)\$(Platform)\</IntDir>
<TargetName>libcompat-x86</TargetName> <TargetName>libcompat-$(PlatformToolset)-$(PlatformTarget)</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<OutDir>$(ProjectDir)\lib\</OutDir> <OutDir>$(ProjectDir)\lib\</OutDir>
<IntDir>$(ProjectDir)\obj\$(Configuration)\$(Platform)\</IntDir> <IntDir>$(ProjectDir)\obj\$(Configuration)\$(Platform)\</IntDir>
<TargetName>libcompat-x64</TargetName> <TargetName>libcompat-$(PlatformToolset)-$(PlatformTarget)</TargetName>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>

View File

@ -80,7 +80,7 @@
<GenerateDebugInformation>false</GenerateDebugInformation> <GenerateDebugInformation>false</GenerateDebugInformation>
<MinimumRequiredVersion>5.1</MinimumRequiredVersion> <MinimumRequiredVersion>5.1</MinimumRequiredVersion>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<AdditionalDependencies>libcompat-x86.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>libcompat-$(PlatformToolset)-$(PlatformTarget).lib</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\CompatLib\lib</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(SolutionDir)\CompatLib\lib</AdditionalLibraryDirectories>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
@ -104,7 +104,7 @@
<GenerateDebugInformation>false</GenerateDebugInformation> <GenerateDebugInformation>false</GenerateDebugInformation>
<MinimumRequiredVersion>5.2</MinimumRequiredVersion> <MinimumRequiredVersion>5.2</MinimumRequiredVersion>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<AdditionalDependencies>libcompat-x64.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>libcompat-$(PlatformToolset)-$(PlatformTarget).lib</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\CompatLib\lib</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(SolutionDir)\CompatLib\lib</AdditionalLibraryDirectories>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>

View File

@ -13,5 +13,5 @@
int main() int main()
{ {
std::cout << "Hello World! [" << ARCH_TYPE << "]" << std::endl; std::cout << "Hello World! [MSVC v" << _MSC_VER << "] [" << ARCH_TYPE << "]\n" << std::endl;
} }

33
make.cmd Normal file
View File

@ -0,0 +1,33 @@
@echo off
setlocal enabledelayedexpansion
cd /d "%~dp0"
if "%MSVC_PATH%"=="" (
set "MSVC_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC"
)
if not exist "%MSVC_PATH%\Auxiliary\Build\vcvarsall.bat" (
echo MSVC not found. Please check your MSVC_PATH and try again^^!
pause
goto:eof
)
for %%p in (x86,x64) do (
call "%MSVC_PATH%\Auxiliary\Build\vcvarsall.bat" %%p
for %%t in (Clean,Rebuild,Build) do (
MSBuild.exe /property:Configuration=Release /property:Platform=%%p /target:%%t /verbosity:normal "%CD%\CompatLib.sln"
if not "!ERRORLEVEL!"=="0" goto:BuildFailed
)
)
echo.
echo Build completed successfully.
echo.
pause
goto:eof
:BuildFailed
echo.
echo Build has failed ^^!^^!^^!
echo.
pause