From 62da563a3e96cdd5442628a688f58672d50fa852 Mon Sep 17 00:00:00 2001 From: Alec Matthews Date: Tue, 25 Jan 2022 11:30:06 -0800 Subject: [PATCH] Added support for MSBuild native builds Including msvc/spdlog.vcxproj allows library users to natively include spdlog in their Visual Studio projects. This is especially useful on systems that do not include CMake. --- .gitignore | 7 ++ msvc/spdlog.sln | 31 ++++++++ msvc/spdlog.vcxproj | 147 ++++++++++++++++++++++++++++++++++++ msvc/spdlog.vcxproj.filters | 36 +++++++++ msvc/spdlog.win.targets | 18 +++++ 5 files changed, 239 insertions(+) create mode 100644 msvc/spdlog.sln create mode 100644 msvc/spdlog.vcxproj create mode 100644 msvc/spdlog.vcxproj.filters create mode 100644 msvc/spdlog.win.targets diff --git a/.gitignore b/.gitignore index ca7c4606..b766835a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Auto generated files [Dd]ebug/ [Rr]elease/ +[Bb]in/ build/* *.slo *.lo @@ -90,3 +91,9 @@ cmake-build-*/ # macos *.DS_store *.xcodeproj/ + +# Visual Studio +**/.vs +!msvc/spdlog.sln +!msvc/spdlog.vcxproj +!msvc/spdlog.vcxproj.filters diff --git a/msvc/spdlog.sln b/msvc/spdlog.sln new file mode 100644 index 00000000..60d65afa --- /dev/null +++ b/msvc/spdlog.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32112.339 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spdlog", "spdlog.vcxproj", "{AAAF8A59-9DE2-4944-B5DF-89FD253F396C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AAAF8A59-9DE2-4944-B5DF-89FD253F396C}.Debug|x64.ActiveCfg = Debug|x64 + {AAAF8A59-9DE2-4944-B5DF-89FD253F396C}.Debug|x64.Build.0 = Debug|x64 + {AAAF8A59-9DE2-4944-B5DF-89FD253F396C}.Debug|x86.ActiveCfg = Debug|Win32 + {AAAF8A59-9DE2-4944-B5DF-89FD253F396C}.Debug|x86.Build.0 = Debug|Win32 + {AAAF8A59-9DE2-4944-B5DF-89FD253F396C}.Release|x64.ActiveCfg = Release|x64 + {AAAF8A59-9DE2-4944-B5DF-89FD253F396C}.Release|x64.Build.0 = Release|x64 + {AAAF8A59-9DE2-4944-B5DF-89FD253F396C}.Release|x86.ActiveCfg = Release|Win32 + {AAAF8A59-9DE2-4944-B5DF-89FD253F396C}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {927CFA46-F0D6-4FB4-97F9-B73A93E7B657} + EndGlobalSection +EndGlobal diff --git a/msvc/spdlog.vcxproj b/msvc/spdlog.vcxproj new file mode 100644 index 00000000..6eac02f8 --- /dev/null +++ b/msvc/spdlog.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {aaaf8a59-9de2-4944-b5df-89fd253f396c} + spdlog + 10.0 + $(ProjectDir)..\bin\$(Platform)\$(Configuration)\ + $(ProjectDir)..\build\$(Platform)\$(Configuration)\ + + + + StaticLibrary + true + v143 + Unicode + + + StaticLibrary + false + v143 + true + Unicode + + + StaticLibrary + true + v143 + Unicode + + + StaticLibrary + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + \ No newline at end of file diff --git a/msvc/spdlog.vcxproj.filters b/msvc/spdlog.vcxproj.filters new file mode 100644 index 00000000..9236832a --- /dev/null +++ b/msvc/spdlog.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/msvc/spdlog.win.targets b/msvc/spdlog.win.targets new file mode 100644 index 00000000..c449bed6 --- /dev/null +++ b/msvc/spdlog.win.targets @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + SPDLOG_COMPILED_LIB;%(PreprocessorDefinitions) + $(MSBuildThisFileDirectory)..\include;%(AdditionalIncludeDirectories) + + +