From e48d740ed7be39c470bd9d30d6d68e0a1f8902c1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 19 May 2020 00:43:37 +0200 Subject: [PATCH] Make props file work for builds using any prefix/DLL combinations The existing wxwidgets.props wasn't particularly useful as it couldn't be used with with wx DLLs when the user project configuration were not called "DLL Debug" or "DLL Release" (and it makes little sense for the user application to use "DLL" in its configuration names just because it happens to use wx as DLL, of course). It also couldn't be used with the libraries built using nmake with a custom COMPILER_PREFIX, which, significantly, includes the official MSW binaries. Try to fix both problems by checking for the actually existing libraries and using whichever ones we find. This is somewhat surprising for a project file to do, but it seems like it should result in the most useful behaviour in practice as it allows user projects importing this file to work out of the box in all of the following situations: - Using official wxMSW binaries. - Building wxMSW from source without any customization. - Building wxMSW from source using reasonable custom compiler prefix. --- wxwidgets.props | 111 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 105 insertions(+), 6 deletions(-) diff --git a/wxwidgets.props b/wxwidgets.props index 074d6b8a30..61bc05cfbd 100644 --- a/wxwidgets.props +++ b/wxwidgets.props @@ -3,28 +3,127 @@ This is a property sheet to be included in MSVS projects of the applications using wxWidgets. Use "View|Property Manager" and choose "Add Existing Property Sheet..." from the context menu to add it from the IDE or edit your - .vcxproj file directly and add + .vcxproj file directly and add tag to it. --> - + - + + + + 100 + 110 + 120 + 140 + 141 + 142 + + 100 + 110 + 120 + 14x + 14x + 14x + + + + + + + 1 + 1 + $(MSBuildThisFileDirectory)lib\vc$(wxToolsetVerABICompat)$(wxArchSuffix)_dll$(wxCfg) + + + + + + 1 + 1 + $(MSBuildThisFileDirectory)lib\vc$(wxToolsetVerABICompat)$(wxArchSuffix)_lib$(wxCfg) + + + + + + 1 + 1 + $(MSBuildThisFileDirectory)lib\vc$(wxToolsetVersion)$(wxArchSuffix)_dll$(wxCfg) + + + + + + 1 + 1 + $(MSBuildThisFileDirectory)lib\vc$(wxToolsetVersion)$(wxArchSuffix)_lib$(wxCfg) + + + + + + 1 + $(MSBuildThisFileDirectory)lib\vc$(wxArchSuffix)_dll$(wxCfg) + + + + + + 1 + $(MSBuildThisFileDirectory)lib\vc$(wxArchSuffix)_lib$(wxCfg) + + + + + + wxMSVC_VERSION_AUTO;wxMSVC_VERSION_ABI_COMPAT + + + + wxMSVC_VERSION_AUTO + + + WXUSINGDLL + + + + + - __WXMSW__;$(wxUsingDllDefine);%(PreprocessorDefinitions) + __WXMSW__;$(wxUsingDllDefine);$(wxVersionDefine);%(PreprocessorDefinitions) $(MSBuildThisFileDirectory)include\msvc;$(MSBuildThisFileDirectory)include;%(AdditionalIncludeDirectories) __WXMSW__;$(wxUsingDllDefine);%(PreprocessorDefinitions) - $(MSBuildThisFileDirectory)lib\$(wxOutDirName)\$(wxToolkitPrefix)$(wxSuffix);$(MSBuildThisFileDirectory)include;%(AdditionalIncludeDirectories) + $(wxLibOrDllDir)\$(wxToolkitPrefix)$(wxSuffix);$(MSBuildThisFileDirectory)include;%(AdditionalIncludeDirectories) - $(MSBuildThisFileDirectory)lib\$(wxOutDirName);%(AdditionalLibraryDirectories) + $(wxLibOrDllDir);%(AdditionalLibraryDirectories)