From ea5ac667066768fdd2887e512e278f62c795f5b7 Mon Sep 17 00:00:00 2001 From: bnnm Date: Wed, 8 Feb 2023 21:06:35 +0100 Subject: [PATCH] vs: move common config to .props and simplify --- Directory.Build.props | 28 ++++++---- cli/vgmstream_cli.vcxproj | 67 ++++------------------- doc/BUILD.md | 2 +- ext_libs/Getopt/getopt.vcxproj | 39 +++---------- ext_libs/ext_libs.vcxproj | 35 ++++-------- fb2k/foo_input_vgmstream.vcxproj | 80 +++++++-------------------- src/libvgmstream.vcxproj | 48 ++++------------ src/libvgmstream.vcxproj.filters | 12 ++++ vgmstream_msvc.props | 94 ++++++++++++++++++++++++++++++++ winamp/in_vgmstream.vcxproj | 74 +++++-------------------- xmplay/xmp-vgmstream.vcxproj | 67 +++++------------------ 11 files changed, 217 insertions(+), 329 deletions(-) create mode 100644 vgmstream_msvc.props diff --git a/Directory.Build.props b/Directory.Build.props index b7784a94..a7661de2 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,13 +1,21 @@ - + - - - - - - 4018;4996;%(DisableSpecificWarnings) - - - + + + + + + v142 + + + false + + + true + + + + \ No newline at end of file diff --git a/cli/vgmstream_cli.vcxproj b/cli/vgmstream_cli.vcxproj index dbe4029e..efb5f030 100644 --- a/cli/vgmstream_cli.vcxproj +++ b/cli/vgmstream_cli.vcxproj @@ -17,29 +17,17 @@ vgmstream-cli - + Application Unicode - true - v142 - - - Application - Unicode - v142 - + + - - - - - - - - ../dependencies - + + + <_ProjectFileVersion>10.0.30319.1 AllRules.ruleset @@ -51,65 +39,34 @@ - Disabled - ..;../ext_includes;../ext_libs/Getopt;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories) - WIN32;VGMSTREAM_VERSION_AUTO;HAVE_JSON;_DEBUG;_WINDOWS;_CONSOLE;%(PreprocessorDefinitions) - EnableFastChecks + $(VCliAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_CONSOLE;$(VCliPreprocessorDefinitions);%(PreprocessorDefinitions) MultiThreadedDebug - - - Level3 - EditAndContinue - ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/jansson.lib;../ext_libs/libspeex-1.lib;%(AdditionalDependencies) + $(VCliAdditionalDependencies32);%(AdditionalDependencies) Console true - MachineX86 - - "$(ProjectDir)..\version-make.bat" - - - Generating version - - ..;../ext_includes;../ext_libs/Getopt;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories) - WIN32;VGMSTREAM_VERSION_AUTO;HAVE_JSON;NDEBUG;_WINDOWS;_CONSOLE;%(PreprocessorDefinitions) + $(VCliAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_CONSOLE;$(VCliPreprocessorDefinitions);%(PreprocessorDefinitions) MultiThreaded - - - Level3 - ProgramDatabase - Fast - ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/jansson.lib;../ext_libs/libspeex-1.lib;%(AdditionalDependencies) + $(VCliAdditionalDependencies32);%(AdditionalDependencies) Console true true true - MachineX86 - - "$(ProjectDir)..\version-make.bat" - - - Generating version - - {10e6bfc6-1e5b-46e4-ba42-f04dfbd0abff} diff --git a/doc/BUILD.md b/doc/BUILD.md index 497a020d..5c25c35e 100644 --- a/doc/BUILD.md +++ b/doc/BUILD.md @@ -360,7 +360,7 @@ msbuild fb2k/foo_input_vgmstream.vcxproj ^ /p:PlatformToolset=v142 ^ /p:WindowsTargetPlatformVersion=10.0 ^ /p:Configuration=Release ^ - /p:DependenciesDir=../.. + /p:VCmnDependenciesDir=../.. ``` ### Audacious plugin diff --git a/ext_libs/Getopt/getopt.vcxproj b/ext_libs/Getopt/getopt.vcxproj index b182cfa4..37942d70 100644 --- a/ext_libs/Getopt/getopt.vcxproj +++ b/ext_libs/Getopt/getopt.vcxproj @@ -16,27 +16,19 @@ Win32Proj - + StaticLibrary - true - v142 - MultiByte - - - StaticLibrary - v142 MultiByte - + + - - - - - - - + + + + + <_ProjectFileVersion>10.0.30319.1 AllRules.ruleset @@ -48,24 +40,12 @@ - Disabled - EnableFastChecks MultiThreadedDebug - Precise - - - Level3 - EditAndContinue MultiThreaded - - - Level3 - ProgramDatabase - Fast @@ -75,6 +55,5 @@ - - + \ No newline at end of file diff --git a/ext_libs/ext_libs.vcxproj b/ext_libs/ext_libs.vcxproj index 5cc81f2f..8475c057 100644 --- a/ext_libs/ext_libs.vcxproj +++ b/ext_libs/ext_libs.vcxproj @@ -16,23 +16,16 @@ Win32Proj - + Utility - v142 - - - Utility - v142 + - - - - - - - + + + + <_ProjectFileVersion>10.0.30319.1 @@ -41,25 +34,20 @@ $(SolutionDir) $(Configuration)\ - - - + Building library stub - lib /def:libmpg123-0.def /machine:x86 - + lib /def:libmpg123-0.def /machine:x86 libmpg123-0.lib;libmpg123-0.exp;%(Outputs) Building library stub - lib /def:libvorbis.def /machine:x86 - + lib /def:libvorbis.def /machine:x86 libvorbis.lib;libvorbis.exp;%(Outputs) Building library stub - lib /def:libg719_decode.def /machine:x86 - + lib /def:libg719_decode.def /machine:x86 libg719_decode.lib;libg719_decode.exp;%(Outputs) @@ -109,6 +97,5 @@ - - + \ No newline at end of file diff --git a/fb2k/foo_input_vgmstream.vcxproj b/fb2k/foo_input_vgmstream.vcxproj index 1664428c..0d197b90 100644 --- a/fb2k/foo_input_vgmstream.vcxproj +++ b/fb2k/foo_input_vgmstream.vcxproj @@ -16,29 +16,17 @@ Win32Proj - + DynamicLibrary Unicode - true - v142 - - - DynamicLibrary - Unicode - v142 - + + - - - - - - - - ../dependencies - + + + <_ProjectFileVersion>10.0.30319.1 AllRules.ruleset @@ -50,57 +38,32 @@ - Disabled - ..;$(DependenciesDir)/wtl/include;$(DependenciesDir)/foobar;%(AdditionalIncludeDirectories) - WIN32;VGMSTREAM_VERSION_AUTO;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions) - EnableFastChecks + $(VFooAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;$(VFooPreprocessorDefinitions);%(PreprocessorDefinitions) MultiThreadedDebugDLL - - - Level3 - EditAndContinue - NoExtensions /d2notypeopt %(AdditionalOptions) - $(DependenciesDir)/foobar/foobar2000/shared/shared.lib;../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex-1.lib;%(AdditionalDependencies) + $(VFooAdditionalDependencies32);%(AdditionalDependencies) true libcmt.lib;msvcrt.lib;libcmtd.lib - - "$(ProjectDir)..\version-make.bat" - - - Generating version - - ..;$(DependenciesDir)/wtl/include;$(DependenciesDir)/foobar;%(AdditionalIncludeDirectories) - WIN32;VGMSTREAM_VERSION_AUTO;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions) + $(VFooAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;$(VFooPreprocessorDefinitions);%(PreprocessorDefinitions) MultiThreadedDLL - - - Level3 - ProgramDatabase - Fast - NoExtensions - /d2notypeopt + /d2notypeopt %(AdditionalOptions) - $(DependenciesDir)/foobar/foobar2000/shared/shared.lib;../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex-1.lib;%(AdditionalDependencies) + $(VFooAdditionalDependencies32);%(AdditionalDependencies) true true true Windows libcmt.lib;libcmtd.lib;msvcrtd.lib - - "$(ProjectDir)..\version-make.bat" - - - Generating version - @@ -117,25 +80,25 @@ - - + {71ad2674-065b-48f5-b8b0-e1f9d3892081} - + {ee47764e-a202-4f85-a767-abdab4aff35f} - + {e8091321-d79d-4575-86ef-064ea1a4a20d} - + {ebfffb4e-261d-44d3-b89c-957b31a0bf9c} - + {7729eb82-4069-4414-964b-ad399091a03f} @@ -146,8 +109,7 @@ - - + diff --git a/src/libvgmstream.vcxproj b/src/libvgmstream.vcxproj index 70262999..8bd5052c 100644 --- a/src/libvgmstream.vcxproj +++ b/src/libvgmstream.vcxproj @@ -16,27 +16,17 @@ Win32Proj - + StaticLibrary - true - v142 - - - StaticLibrary - v142 + - + + - - - - - - - - ../dependencies - + + + <_ProjectFileVersion>10.0.30319.1 AllRules.ruleset @@ -48,29 +38,16 @@ - Disabled - ../ext_includes;../ext_includes/ffmpeg;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories) - WIN32;VGMSTREAM_VERSION_AUTO;VGM_LOG_OUTPUT;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_G719;VGM_USE_ATRAC9;VGM_USE_CELT;VGM_USE_SPEEX;_DEBUG;_LIB;%(PreprocessorDefinitions) - EnableFastChecks + $(VLibAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_LIB;$(VLibPreprocessorDefinitions);%(PreprocessorDefinitions) MultiThreadedDebug - - - Level3 - EditAndContinue - NoExtensions - ../ext_includes;../ext_includes/ffmpeg;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories) - _WIN32_WINNT=0x501;WIN32;VGMSTREAM_VERSION_AUTO;VGM_LOG_OUTPUT;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_G719;VGM_USE_ATRAC9;VGM_USE_CELT;VGM_USE_SPEEX;NDEBUG;_LIB;%(PreprocessorDefinitions) + $(VLibAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) + _WIN32_WINNT=0x501;WIN32;NDEBUG;_LIB;$(VLibPreprocessorDefinitions);%(PreprocessorDefinitions) MultiThreaded - - - Level3 - ProgramDatabase - NoExtensions - Fast @@ -731,6 +708,5 @@ - - + \ No newline at end of file diff --git a/src/libvgmstream.vcxproj.filters b/src/libvgmstream.vcxproj.filters index 1ca0b1f2..ad724b2d 100644 --- a/src/libvgmstream.vcxproj.filters +++ b/src/libvgmstream.vcxproj.filters @@ -36,6 +36,15 @@ {e729b7b3-e13c-4cf9-9ded-428c209b6f62} + + {717f16e9-63ac-4043-87ea-3b84c862e73b} + + + {47034ba8-7631-44db-aa83-c536b5f91212} + + + {eea07e9d-f942-4a76-914a-4f1d8e367130} + {48DB0DEF-3694-40E0-9FF6-8A736E6C3A62} @@ -2009,4 +2018,7 @@ util\Source Files + + + \ No newline at end of file diff --git a/vgmstream_msvc.props b/vgmstream_msvc.props new file mode 100644 index 00000000..d499b964 --- /dev/null +++ b/vgmstream_msvc.props @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + ../dependencies + + ..;../ext_includes;../ext_includes/ffmpeg;../ext_libs/Getopt;$(VCmnDependenciesDir)/qaac/mp4v2/include;$(VCmnDependenciesDir)/fdk-aac/libSYS/include;$(VCmnDependenciesDir)/fdk-aac/libAACdec/include + ..;../ext_includes;../ext_libs/Getopt + ..;$(VCmnDependenciesDir)/wtl/include;$(VCmnDependenciesDir)/foobar + .. + + VGMSTREAM_VERSION_AUTO;VGM_LOG_OUTPUT;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_G719;VGM_USE_ATRAC9;VGM_USE_CELT;VGM_USE_SPEEX + VGMSTREAM_VERSION_AUTO + $(VCmnPreprocessorDefinitions) + $(VCmnPreprocessorDefinitions) + $(VCmnPreprocessorDefinitions) + $(VCmnPreprocessorDefinitions);IN_VGMSTREAM_EXPORTS;VGM_WINAMP_UNICODE + + ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex-1.lib + $(VCmnAdditionalDependencies32);../ext_libs/jansson.lib + $(VCmnAdditionalDependencies32);$(VCmnDependenciesDir)/foobar/foobar2000/shared/shared.lib + "$(ProjectDir)..\version-make.bat" + + + + + + Level3 + Fast + Precise + 4018;4996;%(DisableSpecificWarnings) + + + Generating version + $(VBuildCommandVersion) + + + + + Disabled + NoExtensions + EditAndContinue + EnableFastChecks + + + + + MaxSpeed + NoExtensions + ProgramDatabase + + + + + MachineX86 + + + + + + + + + \ No newline at end of file diff --git a/winamp/in_vgmstream.vcxproj b/winamp/in_vgmstream.vcxproj index a0511ca7..056dabcd 100644 --- a/winamp/in_vgmstream.vcxproj +++ b/winamp/in_vgmstream.vcxproj @@ -16,29 +16,17 @@ Win32Proj - - DynamicLibrary - MultiByte - true - v142 - - + DynamicLibrary Unicode - v142 - + + - - - - - - - - ../dependencies - + + + <_ProjectFileVersion>10.0.30319.1 AllRules.ruleset @@ -50,58 +38,31 @@ - Disabled - ..;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories) - WIN32;VGMSTREAM_VERSION_AUTO;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;VGM_WINAMP_UNICODE;%(PreprocessorDefinitions) - EnableFastChecks + $(VCmdAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;$(VWmpPreprocessorDefinitions);%(PreprocessorDefinitions) MultiThreadedDebug - - - Level3 - EditAndContinue - ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex-1.lib;%(AdditionalDependencies) + $(VCmnAdditionalDependencies32);%(AdditionalDependencies) true Windows false - - MachineX86 - - "$(ProjectDir)..\version-make.bat" - - - Generating version - - ..;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories) - WIN32;VGMSTREAM_VERSION_AUTO;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;VGM_WINAMP_UNICODE;%(PreprocessorDefinitions) + $(VCmdAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;$(VWmpPreprocessorDefinitions);%(PreprocessorDefinitions) MultiThreaded - - - Level3 - ProgramDatabase - Fast - ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex-1.lib;%(AdditionalDependencies) + $(VCmnAdditionalDependencies32);%(AdditionalDependencies) true true true - false - Windows - MachineX86 + false - - "$(ProjectDir)..\version-make.bat" - - - Generating version - @@ -116,12 +77,6 @@ - {10e6bfc6-1e5b-46e4-ba42-f04dfbd0abff} @@ -130,6 +85,5 @@ - - + \ No newline at end of file diff --git a/xmplay/xmp-vgmstream.vcxproj b/xmplay/xmp-vgmstream.vcxproj index 366ee59c..673d3882 100644 --- a/xmplay/xmp-vgmstream.vcxproj +++ b/xmplay/xmp-vgmstream.vcxproj @@ -16,29 +16,17 @@ Win32Proj - + DynamicLibrary MultiByte - true - v142 - - - DynamicLibrary - MultiByte - v142 - + + - - - - - - - - ../dependencies - + + + <_ProjectFileVersion>10.0.30319.1 AllRules.ruleset @@ -50,55 +38,33 @@ - Disabled - ..;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories) - WIN32;VGMSTREAM_VERSION_AUTO;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions) - EnableFastChecks + $(VCmdAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;$(VXmpPreprocessorDefinitions);%(PreprocessorDefinitions) MultiThreadedDebug - Level3 - EditAndContinue - ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex-1.lib;%(AdditionalDependencies) + $(VCmnAdditionalDependencies32);%(AdditionalDependencies) true - MachineX86 Windows xmpin.def - - "$(ProjectDir)..\version-make.bat" - - - Generating version - - ..;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories) - _WIN32_WINNT=0x501;WIN32;VGMSTREAM_VERSION_AUTO;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions) + $(VCmdAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) + _WIN32_WINNT=0x501;WIN32;NDEBUG;_WINDOWS;_USRDLL;$(VXmpPreprocessorDefinitions);%(PreprocessorDefinitions) MultiThreaded - Level3 - ProgramDatabase - Fast - MaxSpeed true true - ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex-1.lib;%(AdditionalDependencies) + $(VCmnAdditionalDependencies32);%(AdditionalDependencies) true true true - MachineX86 Windows xmpin.def - - "$(ProjectDir)..\version-make.bat" - - - Generating version - @@ -111,12 +77,6 @@ - {10e6bfc6-1e5b-46e4-ba42-f04dfbd0abff} @@ -125,6 +85,5 @@ - - + \ No newline at end of file