Fix automatic linking with MSVC for monolithic builds
MSVC users can simplify their projects by prepending $(WXWIN)\include\msvc to the compiler include directories, which results in automatic including the build-specific setup.h and linking all required wxWidgets and system libraries. This worked only for the default multilib builds but not for monolithic builds where wxWidgets libraries are created and named differently. This patch allows the users (by defining wxMONOLITHIC=1 in their project) to use it also for monolithic builds.
This commit is contained in:
@@ -149,20 +149,27 @@
|
||||
// special version for regex as it does have a Unicode version
|
||||
#define wx3RD_PARTY_LIB_NAME_U(name) "wx" name wxSUFFIX_STR
|
||||
|
||||
#pragma comment(lib, wxWX_LIB_NAME("base", ""))
|
||||
#if defined(wxMONOLITHIC) && wxMONOLITHIC == 1
|
||||
#pragma comment(lib, wxWX_LIB_NAME("msw", ""))
|
||||
#else
|
||||
#pragma comment(lib, wxWX_LIB_NAME("base", ""))
|
||||
|
||||
#ifndef wxNO_NET_LIB
|
||||
#ifndef WXUSINGDLL
|
||||
#pragma comment(lib, "wsock32")
|
||||
#endif
|
||||
#ifndef wxNO_NET_LIB
|
||||
#pragma comment(lib, wxBASE_LIB_NAME("net"))
|
||||
#endif
|
||||
#if wxUSE_XML && !defined(wxNO_XML_LIB)
|
||||
#pragma comment(lib, wxBASE_LIB_NAME("xml"))
|
||||
#if !defined(wxNO_EXPAT_LIB) && !defined(WXUSINGDLL)
|
||||
#pragma comment(lib, wx3RD_PARTY_LIB_NAME("expat"))
|
||||
#endif
|
||||
#if wxUSE_XML && !defined(wxNO_XML_LIB)
|
||||
#pragma comment(lib, wxBASE_LIB_NAME("xml"))
|
||||
#endif
|
||||
#endif // defined(wxMONOLITHIC) && wxMONOLITHIC == 1
|
||||
|
||||
#if !defined(wxNO_NET_LIB) && !defined(WXUSINGDLL)
|
||||
#pragma comment(lib, "wsock32")
|
||||
#endif
|
||||
|
||||
#if wxUSE_XML && !defined(wxNO_XML_LIB) && !defined(wxNO_EXPAT_LIB) && !defined(WXUSINGDLL)
|
||||
#pragma comment(lib, wx3RD_PARTY_LIB_NAME("expat"))
|
||||
#endif
|
||||
|
||||
#if wxUSE_REGEX && !defined(wxNO_REGEX_LIB) && !defined(WXUSINGDLL)
|
||||
#pragma comment(lib, wx3RD_PARTY_LIB_NAME_U("regex"))
|
||||
#endif
|
||||
@@ -181,6 +188,8 @@
|
||||
#pragma comment(lib, wx3RD_PARTY_LIB_NAME("tiff"))
|
||||
#endif
|
||||
|
||||
#if !defined(wxMONOLITHIC) || wxMONOLITHIC == 0
|
||||
|
||||
#pragma comment(lib, wxTOOLKIT_LIB_NAME("core"))
|
||||
|
||||
#ifndef wxNO_ADV_LIB
|
||||
@@ -190,9 +199,6 @@
|
||||
#if wxUSE_HTML && !defined(wxNO_HTML_LIB)
|
||||
#pragma comment(lib, wxTOOLKIT_LIB_NAME("html"))
|
||||
#endif
|
||||
#if wxUSE_GLCANVAS && !defined(wxNO_GL_LIB)
|
||||
#pragma comment(lib, wxTOOLKIT_LIB_NAME("gl"))
|
||||
#endif
|
||||
#if wxUSE_DEBUGREPORT && !defined(wxNO_QA_LIB)
|
||||
#pragma comment(lib, wxTOOLKIT_LIB_NAME("qa"))
|
||||
#endif
|
||||
@@ -216,13 +222,20 @@
|
||||
#endif
|
||||
#if wxUSE_STC && !defined(wxNO_STC_LIB)
|
||||
#pragma comment(lib, wxTOOLKIT_LIB_NAME("stc"))
|
||||
#ifndef WXUSINGDLL
|
||||
#pragma comment(lib, wx3RD_PARTY_LIB_NAME("scintilla"))
|
||||
#endif
|
||||
#endif
|
||||
#if wxUSE_WEBVIEW && !defined(wxNO_WEBVIEW_LIB)
|
||||
#pragma comment(lib, wxTOOLKIT_LIB_NAME("webview"))
|
||||
#endif
|
||||
#endif // !defined(wxMONOLITHIC) || wxMONOLITHIC == 0
|
||||
|
||||
#if wxUSE_GLCANVAS && !defined(wxNO_GL_LIB)
|
||||
#pragma comment(lib, wxTOOLKIT_LIB_NAME("gl"))
|
||||
#endif
|
||||
|
||||
#if wxUSE_STC && !defined(wxNO_STC_LIB) && !defined(WXUSINGDLL)
|
||||
#pragma comment(lib, wx3RD_PARTY_LIB_NAME("scintilla"))
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user