Merge pull request #10616 from shuffle2/fmt-lib

msbuild: fmt static library
This commit is contained in:
Mai M 2022-04-26 23:25:58 -04:00 committed by GitHub
commit e4695e329c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 76 additions and 16 deletions

View File

@ -34,6 +34,9 @@
<ProjectReference Include="$(ExternalsDir)enet\enet.vcxproj">
<Project>{cbc76802-c128-4b17-bf6c-23b08c313e5e}</Project>
</ProjectReference>
<ProjectReference Include="$(ExternalsDir)fmt\fmt.vcxproj">
<Project>{4BC5A148-0AB3-440F-A980-A29B4B999190}</Project>
</ProjectReference>
<ProjectReference Include="$(ExternalsDir)FreeSurround\FreeSurround.vcxproj">
<Project>{8498f2fa-5ca6-4169-9971-de5b1fe6132c}</Project>
</ProjectReference>

40
Externals/fmt/fmt.vcxproj vendored Normal file
View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\Source\VSProps\Base.Macros.props" />
<Import Project="$(VSPropsDir)Base.Targets.props" />
<PropertyGroup Label="Globals">
<ProjectGuid>{4BC5A148-0AB3-440F-A980-A29B4B999190}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VSPropsDir)Configuration.StaticLibrary.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VSPropsDir)Base.props" />
<Import Project="$(VSPropsDir)ClDisableAllWarnings.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemGroup>
<ClCompile Include="src/format.cc" />
<ClCompile Include="src/os.cc" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="include/fmt/args.h" />
<ClInclude Include="include/fmt/chrono.h" />
<ClInclude Include="include/fmt/color.h" />
<ClInclude Include="include/fmt/compile.h" />
<ClInclude Include="include/fmt/core.h" />
<ClInclude Include="include/fmt/format-inl.h" />
<ClInclude Include="include/fmt/format.h" />
<ClInclude Include="include/fmt/locale.h" />
<ClInclude Include="include/fmt/os.h" />
<ClInclude Include="include/fmt/ostream.h" />
<ClInclude Include="include/fmt/printf.h" />
<ClInclude Include="include/fmt/ranges.h" />
<ClInclude Include="include/fmt/xchar.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -39,21 +39,6 @@
#ifndef STTypes_H
#define STTypes_H
typedef unsigned int uint;
typedef unsigned long ulong;
// Patch for MinGW: on Win64 long is 32-bit
#ifdef _WIN64
typedef unsigned long long ulongptr;
#else
typedef ulong ulongptr;
#endif
// Helper macro for aligning pointer up to next 16-byte boundary
#define SOUNDTOUCH_ALIGN_POINTER_16(x) ( ( (ulongptr)(x) + 15 ) & ~(ulongptr)15 )
#if (defined(__GNUC__) && !defined(ANDROID))
// In GCC, include soundtouch_config.h made by config scritps.
// Skip this in Android compilation that uses GCC but without configure scripts.
@ -63,6 +48,20 @@ typedef unsigned long ulong;
namespace soundtouch
{
typedef unsigned int uint;
typedef unsigned long ulong;
// Patch for MinGW: on Win64 long is 32-bit
#ifdef _WIN64
typedef unsigned long long ulongptr;
#else
typedef ulong ulongptr;
#endif
// Helper macro for aligning pointer up to next 16-byte boundary
#define SOUNDTOUCH_ALIGN_POINTER_16(x) ( ( (ulongptr)(x) + 15 ) & ~(ulongptr)15 )
/// Activate these undef's to overrule the possible sampletype
/// setting inherited from some other header file:
#undef SOUNDTOUCH_INTEGER_SAMPLES

View File

@ -51,6 +51,8 @@
#define SUPPORT_SSE 0x0008
#define SUPPORT_SSE2 0x0010
using namespace soundtouch;
/// Checks which instruction set extensions are supported by the CPU.
///
/// \return A bitmask of supported extensions, see SUPPORT_... defines.

View File

@ -36,6 +36,9 @@
<ProjectReference Include="$(ExternalsDir)ed25519\ed25519.vcxproj">
<Project>{5bdf4b91-1491-4fb0-bc27-78e9a8e97dc3}</Project>
</ProjectReference>
<ProjectReference Include="$(ExternalsDir)fmt\fmt.vcxproj">
<Project>{4BC5A148-0AB3-440F-A980-A29B4B999190}</Project>
</ProjectReference>
<ProjectReference Include="$(ExternalsDir)mbedtls\mbedTLS.vcxproj">
<Project>{bdb6578b-0691-4e80-a46c-df21639fd3b8}</Project>
</ProjectReference>

View File

@ -38,6 +38,9 @@
<ProjectReference Include="$(CoreDir)DolphinLib.vcxproj">
<Project>{D79392F7-06D6-4B4B-A39F-4D587C215D3A}</Project>
</ProjectReference>
<ProjectReference Include="$(ExternalsDir)fmt\fmt.vcxproj">
<Project>{4BC5A148-0AB3-440F-A980-A29B4B999190}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@ -55,7 +55,6 @@
<ExternalTemplatesDiagnostics>true</ExternalTemplatesDiagnostics>
<DisableAnalyzeExternal>true</DisableAnalyzeExternal>
<TreatAngleIncludeAsExternal>true</TreatAngleIncludeAsExternal>
<PreprocessorDefinitions>FMT_HEADER_ONLY=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<!--
It would be a good idea to disable _CRT_SECURE_NO_WARNINGS and get rid of e.g. C string parsing funcs
Unfortunately this also complains about FILE* APIs, which can be inconvenient to replace.

View File

@ -77,6 +77,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zstd", "..\Externals\zstd\z
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mgba", "..\Externals\mGBA\mgba.vcxproj", "{864C4C8E-296D-3DBC-AD83-F1D5CB6E8EC6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fmt", "..\Externals\fmt\fmt.vcxproj", "{4BC5A148-0AB3-440F-A980-A29B4B999190}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
@ -369,6 +371,14 @@ Global
{864C4C8E-296D-3DBC-AD83-F1D5CB6E8EC6}.Release|ARM64.Build.0 = Release|ARM64
{864C4C8E-296D-3DBC-AD83-F1D5CB6E8EC6}.Release|x64.ActiveCfg = Release|x64
{864C4C8E-296D-3DBC-AD83-F1D5CB6E8EC6}.Release|x64.Build.0 = Release|x64
{4BC5A148-0AB3-440F-A980-A29B4B999190}.Debug|ARM64.ActiveCfg = Debug|ARM64
{4BC5A148-0AB3-440F-A980-A29B4B999190}.Debug|ARM64.Build.0 = Debug|ARM64
{4BC5A148-0AB3-440F-A980-A29B4B999190}.Debug|x64.ActiveCfg = Debug|x64
{4BC5A148-0AB3-440F-A980-A29B4B999190}.Debug|x64.Build.0 = Debug|x64
{4BC5A148-0AB3-440F-A980-A29B4B999190}.Release|ARM64.ActiveCfg = Release|ARM64
{4BC5A148-0AB3-440F-A980-A29B4B999190}.Release|ARM64.Build.0 = Release|ARM64
{4BC5A148-0AB3-440F-A980-A29B4B999190}.Release|x64.ActiveCfg = Release|x64
{4BC5A148-0AB3-440F-A980-A29B4B999190}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -400,6 +410,7 @@ Global
{055A775F-B4F5-4970-9240-F6CF7661F37B} = {87ADDFF9-5768-4DA2-A33B-2477593D6677}
{1BEA10F3-80CE-4BC4-9331-5769372CDF99} = {87ADDFF9-5768-4DA2-A33B-2477593D6677}
{864C4C8E-296D-3DBC-AD83-F1D5CB6E8EC6} = {87ADDFF9-5768-4DA2-A33B-2477593D6677}
{4BC5A148-0AB3-440F-A980-A29B4B999190} = {87ADDFF9-5768-4DA2-A33B-2477593D6677}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {64B0A343-3B94-4522-9C24-6937FE5EFB22}