From da0a2aca6b2668b4bd5b69b0ee589bce155ee861 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 27 Aug 2013 22:49:44 +0000 Subject: [PATCH] Handle custom configurations in MSVC-specific setup.h. Account for wxCFG when building the paths used for MSVC autolinking. This variable should be defined to the same value as CFG during (command line) build. Closes #15431. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + docs/doxygen/mainpages/const_cpp.h | 6 ++++++ include/msvc/wx/setup.h | 13 +++++++++++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 1b45e3c7fc..243ee67b6f 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -577,6 +577,7 @@ wxMSW: - It is now possible to tab into radio boxes again. - Fix launching some types of files under Windows 7 and later (Steven Houchins). - Don't use an icon for items inserted without one into wxListCtrl (Chuddah). +- Handle custom configurations when using MSVC autolinking (tinman). wxOSX: diff --git a/docs/doxygen/mainpages/const_cpp.h b/docs/doxygen/mainpages/const_cpp.h index 3afa1f5a18..af2b12d433 100644 --- a/docs/doxygen/mainpages/const_cpp.h +++ b/docs/doxygen/mainpages/const_cpp.h @@ -247,6 +247,12 @@ with the corresponding library. The following symbols are honoured: Notice that the base library is always included and the core is always included for the GUI applications (i.e. those which don't define @c wxUSE_GUI as 0). +If the makefiles have been used to build the libraries from source and the @c CFG +variable has been set to specify a different output path for that particular +configuration of build then the @c wxCFG preprocessor symbol should be set in +the project that uses wxWidgets to the same value as the @c CFG variable in +order for the correct @c wx/setup.h file to automatically be included for that +configuration. @section page_cppconst_miscellaneous Miscellaneous diff --git a/include/msvc/wx/setup.h b/include/msvc/wx/setup.h index fb7c051f25..31c5efc42f 100644 --- a/include/msvc/wx/setup.h +++ b/include/msvc/wx/setup.h @@ -79,10 +79,19 @@ #define wxARCH_SUFFIX #endif +// Ensure the library configuration is defined +#ifndef wxCFG + #define wxCFG +#endif + +// Construct the path for the subdirectory under /lib/ that the included setup.h +// will be used from #ifdef WXUSINGDLL - #define wxLIB_SUBDIR wxCONCAT3(wxCOMPILER_PREFIX, wxARCH_SUFFIX, _dll) + #define wxLIB_SUBDIR \ + wxCONCAT4(wxCOMPILER_PREFIX, wxARCH_SUFFIX, _dll, wxCFG) #else // !DLL - #define wxLIB_SUBDIR wxCONCAT3(wxCOMPILER_PREFIX, wxARCH_SUFFIX, _lib) + #define wxLIB_SUBDIR \ + wxCONCAT4(wxCOMPILER_PREFIX, wxARCH_SUFFIX, _lib, wxCFG) #endif // DLL/!DLL // The user can predefine a different prefix if not using the default MSW port -- 2.45.2