]>
git.saurik.com Git - wxWidgets.git/blob - include/msvc/wx/setup.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: msvc/wx/setup.h
3 // Purpose: wrapper around the real wx/setup.h for Visual C++
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org>
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #error "This file should only be included when using Microsoft Visual C++"
16 // VC++ IDE predefines _DEBUG and _UNICODE for the new projects itself, but
17 // the other symbols (WXUSINGDLL, __WXUNIVERSAL__, ...) should be defined
20 #include "wx/version.h"
23 // notice that wxSUFFIX_DEBUG is a string but wxSUFFIX itself must be an
24 // identifier as string concatenation is not done inside #include where we
27 #define wxSUFFIX_DEBUG "d"
32 #endif // _UNICODE/!_UNICODE
34 #define wxSUFFIX_DEBUG ""
38 // don't define wxSUFFIX at all as preprocessor operations don't work
39 // with empty values so we need to check for this case specially below
40 #endif // _UNICODE/!_UNICODE
43 // compiler-specific prefix: by default it's always just "vc" for compatibility
44 // reasons but if you use multiple MSVC versions you probably build them with
45 // COMPILER_PREFIX=vcXX and in this case you may want to either predefine
46 // wxMSVC_VERSION as "XX" or define wxMSVC_VERSION_AUTO to use the appropriate
47 // version depending on the compiler used
49 #define wxCOMPILER_PREFIX wxCONCAT(vc, wxMSVC_VERSION)
50 #elif defined(wxMSVC_VERSION_AUTO)
52 #define wxCOMPILER_PREFIX vc60
53 #elif _MSC_VER == 1300
54 #define wxCOMPILER_PREFIX vc70
55 #elif _MSC_VER == 1310
56 #define wxCOMPILER_PREFIX vc71
57 #elif _MSC_VER == 1400
58 #define wxCOMPILER_PREFIX vc80
59 #elif _MSC_VER == 1500
60 #define wxCOMPILER_PREFIX vc90
61 #elif _MSC_VER == 1600
62 #define wxCOMPILER_PREFIX vc100
63 #elif _MSC_VER == 1700
64 #define wxCOMPILER_PREFIX vc110
66 #error "Unknown MSVC compiler version, please report to wx-dev."
69 #define wxCOMPILER_PREFIX vc
72 // architecture-specific part: not used (again, for compatibility), for x86
74 #define wxARCH_SUFFIX _amd64
75 #elif defined(_M_IA64)
76 #define wxARCH_SUFFIX _ia64
77 #else // assume _M_IX86
82 #define wxLIB_SUBDIR wxCONCAT3(wxCOMPILER_PREFIX, wxARCH_SUFFIX, _dll)
84 #define wxLIB_SUBDIR wxCONCAT3(wxCOMPILER_PREFIX, wxARCH_SUFFIX, _lib)
87 // The user can predefine a different prefix if not using the default MSW port
89 #ifndef wxTOOLKIT_PREFIX
90 #define wxTOOLKIT_PREFIX msw
91 #endif // wxTOOLKIT_PREFIX
93 // the real setup.h header file we need is in the build-specific directory,
94 // construct the path to it
96 #define wxSETUPH_PATH \
97 wxCONCAT6(../../../lib/, wxLIB_SUBDIR, /, wxTOOLKIT_PREFIX, wxSUFFIX, /wx/setup.h)
98 #else // suffix is empty
99 #define wxSETUPH_PATH \
100 wxCONCAT5(../../../lib/, wxLIB_SUBDIR, /, wxTOOLKIT_PREFIX, /wx/setup.h)
103 #define wxSETUPH_PATH_STR wxSTRINGIZE(wxSETUPH_PATH)
105 #include wxSETUPH_PATH_STR
108 // the library names depend on the build, these macro builds the correct
109 // library name for the given base name
111 #define wxSUFFIX_STR wxSTRINGIZE(wxSUFFIX)
112 #else // suffix is empty
113 #define wxSUFFIX_STR ""
115 #define wxSHORT_VERSION_STRING \
116 wxSTRINGIZE(wxMAJOR_VERSION) wxSTRINGIZE(wxMINOR_VERSION)
118 #define wxWX_LIB_NAME(name, subname) \
119 "wx" name wxSHORT_VERSION_STRING wxSUFFIX_STR subname
121 #define wxBASE_LIB_NAME(name) wxWX_LIB_NAME("base", "_" name)
122 #define wxTOOLKIT_LIB_NAME(name) wxWX_LIB_NAME(wxSTRINGIZE(wxTOOLKIT_PREFIX), "_" name)
124 // This one is for 3rd party libraries: they don't have the version number
125 // in their names and usually exist in ANSI version only (except for regex)
127 // 3rd party libraries are also are not linked in when using DLLs as they're
128 // embedded inside our own DLLs and don't need to be linked with the user code.
129 #define wx3RD_PARTY_LIB_NAME(name) "wx" name wxSUFFIX_DEBUG
131 // special version for regex as it does have a Unicode version
132 #define wx3RD_PARTY_LIB_NAME_U(name) "wx" name wxSUFFIX_STR
134 #pragma comment(lib, wxWX_LIB_NAME("base", ""))
137 #pragma comment(lib, wxBASE_LIB_NAME("net"))
140 #pragma comment(lib, wxBASE_LIB_NAME("xml"))
142 #if wxUSE_REGEX && !defined(wxNO_REGEX_LIB) && !defined(WXUSINGDLL)
143 #pragma comment(lib, wx3RD_PARTY_LIB_NAME_U("regex"))
147 #if wxUSE_XML && !defined(wxNO_EXPAT_LIB) && !defined(WXUSINGDLL)
148 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("expat"))
150 #if wxUSE_LIBJPEG && !defined(wxNO_JPEG_LIB) && !defined(WXUSINGDLL)
151 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("jpeg"))
153 #if wxUSE_LIBPNG && !defined(wxNO_PNG_LIB) && !defined(WXUSINGDLL)
154 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("png"))
156 #if wxUSE_LIBTIFF && !defined(wxNO_TIFF_LIB) && !defined(WXUSINGDLL)
157 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("tiff"))
159 #if wxUSE_ZLIB && !defined(wxNO_ZLIB_LIB) && !defined(WXUSINGDLL)
160 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("zlib"))
163 #pragma comment(lib, wxTOOLKIT_LIB_NAME("core"))
166 #pragma comment(lib, wxTOOLKIT_LIB_NAME("adv"))
169 #ifndef wxNO_HTML_LIB
170 #pragma comment(lib, wxTOOLKIT_LIB_NAME("html"))
172 #if wxUSE_GLCANVAS && !defined(wxNO_GL_LIB)
173 #pragma comment(lib, wxTOOLKIT_LIB_NAME("gl"))
175 #if wxUSE_DEBUGREPORT && !defined(wxNO_QA_LIB)
176 #pragma comment(lib, wxTOOLKIT_LIB_NAME("qa"))
178 #if wxUSE_XRC && !defined(wxNO_XRC_LIB)
179 #pragma comment(lib, wxTOOLKIT_LIB_NAME("xrc"))
181 #if wxUSE_AUI && !defined(wxNO_AUI_LIB)
182 #pragma comment(lib, wxTOOLKIT_LIB_NAME("aui"))
184 #if wxUSE_PROPGRID && !defined(wxNO_PROPGRID_LIB)
185 #pragma comment(lib, wxTOOLKIT_LIB_NAME("propgrid"))
187 #if wxUSE_RIBBON && !defined(wxNO_RIBBON_LIB)
188 #pragma comment(lib, wxTOOLKIT_LIB_NAME("ribbon"))
190 #if wxUSE_RICHTEXT && !defined(wxNO_RICHTEXT_LIB)
191 #pragma comment(lib, wxTOOLKIT_LIB_NAME("richtext"))
193 #if wxUSE_MEDIACTRL && !defined(wxNO_MEDIA_LIB)
194 #pragma comment(lib, wxTOOLKIT_LIB_NAME("media"))
196 #if wxUSE_STC && !defined(wxNO_STC_LIB)
197 #pragma comment(lib, wxTOOLKIT_LIB_NAME("stc"))
199 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("scintilla"))
206 // Make sure all required system libraries are added to the linker too when
207 // using static libraries.
208 #pragma comment(lib, "kernel32")
209 #pragma comment(lib, "user32")
210 #pragma comment(lib, "gdi32")
211 #pragma comment(lib, "comdlg32")
212 #pragma comment(lib, "winspool")
213 #pragma comment(lib, "winmm")
214 #pragma comment(lib, "shell32")
215 #pragma comment(lib, "comctl32")
216 #pragma comment(lib, "ole32")
217 #pragma comment(lib, "oleaut32")
218 #pragma comment(lib, "uuid")
219 #pragma comment(lib, "rpcrt4")
220 #pragma comment(lib, "advapi32")
221 #pragma comment(lib, "wsock32")
223 #pragma comment(lib, "wininet")
225 #endif // !WXUSINGDLL