]>
git.saurik.com Git - wxWidgets.git/blob - include/msvc/wx/setup.h
fb7c051f256ac2ed302f3e8933fd7284ca356e00
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: msvc/wx/setup.h
3 // Purpose: wrapper around the real wx/setup.h for Visual C++
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org>
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #error "This file should only be included when using Microsoft Visual C++"
15 // VC++ IDE predefines _DEBUG and _UNICODE for the new projects itself, but
16 // the other symbols (WXUSINGDLL, __WXUNIVERSAL__, ...) should be defined
19 #include "wx/version.h"
22 // notice that wxSUFFIX_DEBUG is a string but wxSUFFIX itself must be an
23 // identifier as string concatenation is not done inside #include where we
26 #define wxSUFFIX_DEBUG "d"
31 #endif // _UNICODE/!_UNICODE
33 #define wxSUFFIX_DEBUG ""
37 // don't define wxSUFFIX at all as preprocessor operations don't work
38 // with empty values so we need to check for this case specially below
39 #endif // _UNICODE/!_UNICODE
42 // compiler-specific prefix: by default it's always just "vc" for compatibility
43 // reasons but if you use multiple MSVC versions you probably build them with
44 // COMPILER_PREFIX=vcXX and in this case you may want to either predefine
45 // wxMSVC_VERSION as "XX" or define wxMSVC_VERSION_AUTO to use the appropriate
46 // version depending on the compiler used
48 #define wxCOMPILER_PREFIX wxCONCAT(vc, wxMSVC_VERSION)
49 #elif defined(wxMSVC_VERSION_AUTO)
51 #define wxCOMPILER_PREFIX vc60
52 #elif _MSC_VER == 1300
53 #define wxCOMPILER_PREFIX vc70
54 #elif _MSC_VER == 1310
55 #define wxCOMPILER_PREFIX vc71
56 #elif _MSC_VER == 1400
57 #define wxCOMPILER_PREFIX vc80
58 #elif _MSC_VER == 1500
59 #define wxCOMPILER_PREFIX vc90
60 #elif _MSC_VER == 1600
61 #define wxCOMPILER_PREFIX vc100
62 #elif _MSC_VER == 1700
63 #define wxCOMPILER_PREFIX vc110
64 #elif _MSC_VER == 1800
65 #define wxCOMPILER_PREFIX vc120
67 #error "Unknown MSVC compiler version, please report to wx-dev."
70 #define wxCOMPILER_PREFIX vc
73 // architecture-specific part: not used (again, for compatibility), for x86
75 #define wxARCH_SUFFIX _x64
76 #elif defined(_M_IA64)
77 #define wxARCH_SUFFIX _ia64
78 #else // assume _M_IX86
83 #define wxLIB_SUBDIR wxCONCAT3(wxCOMPILER_PREFIX, wxARCH_SUFFIX, _dll)
85 #define wxLIB_SUBDIR wxCONCAT3(wxCOMPILER_PREFIX, wxARCH_SUFFIX, _lib)
88 // The user can predefine a different prefix if not using the default MSW port
90 #ifndef wxTOOLKIT_PREFIX
91 #if defined(__WXGTK__)
92 #define wxTOOLKIT_PREFIX gtk2
94 #define wxTOOLKIT_PREFIX msw
96 #endif // wxTOOLKIT_PREFIX
98 // the real setup.h header file we need is in the build-specific directory,
99 // construct the path to it
101 #define wxSETUPH_PATH \
102 wxCONCAT6(../../../lib/, wxLIB_SUBDIR, /, wxTOOLKIT_PREFIX, wxSUFFIX, /wx/setup.h)
103 #else // suffix is empty
104 #define wxSETUPH_PATH \
105 wxCONCAT5(../../../lib/, wxLIB_SUBDIR, /, wxTOOLKIT_PREFIX, /wx/setup.h)
108 #define wxSETUPH_PATH_STR wxSTRINGIZE(wxSETUPH_PATH)
110 #include wxSETUPH_PATH_STR
113 // the library names depend on the build, these macro builds the correct
114 // library name for the given base name
116 #define wxSUFFIX_STR wxSTRINGIZE(wxSUFFIX)
117 #else // suffix is empty
118 #define wxSUFFIX_STR ""
120 #define wxSHORT_VERSION_STRING \
121 wxSTRINGIZE(wxMAJOR_VERSION) wxSTRINGIZE(wxMINOR_VERSION)
123 #define wxWX_LIB_NAME(name, subname) \
124 "wx" name wxSHORT_VERSION_STRING wxSUFFIX_STR subname
126 #define wxBASE_LIB_NAME(name) wxWX_LIB_NAME("base", "_" name)
127 #define wxTOOLKIT_LIB_NAME(name) wxWX_LIB_NAME(wxSTRINGIZE(wxTOOLKIT_PREFIX), "_" name)
129 // This one is for 3rd party libraries: they don't have the version number
130 // in their names and usually exist in ANSI version only (except for regex)
132 // 3rd party libraries are also are not linked in when using DLLs as they're
133 // embedded inside our own DLLs and don't need to be linked with the user code.
134 #define wx3RD_PARTY_LIB_NAME(name) "wx" name wxSUFFIX_DEBUG
136 // special version for regex as it does have a Unicode version
137 #define wx3RD_PARTY_LIB_NAME_U(name) "wx" name wxSUFFIX_STR
139 #pragma comment(lib, wxWX_LIB_NAME("base", ""))
142 #pragma comment(lib, wxBASE_LIB_NAME("net"))
145 #pragma comment(lib, wxBASE_LIB_NAME("xml"))
147 #if wxUSE_REGEX && !defined(wxNO_REGEX_LIB) && !defined(WXUSINGDLL)
148 #pragma comment(lib, wx3RD_PARTY_LIB_NAME_U("regex"))
152 #if wxUSE_XML && !defined(wxNO_EXPAT_LIB) && !defined(WXUSINGDLL)
153 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("expat"))
155 #if wxUSE_LIBJPEG && !defined(wxNO_JPEG_LIB) && !defined(WXUSINGDLL)
156 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("jpeg"))
158 #if wxUSE_LIBPNG && !defined(wxNO_PNG_LIB) && !defined(WXUSINGDLL)
159 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("png"))
161 #if wxUSE_LIBTIFF && !defined(wxNO_TIFF_LIB) && !defined(WXUSINGDLL)
162 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("tiff"))
164 #if wxUSE_ZLIB && !defined(wxNO_ZLIB_LIB) && !defined(WXUSINGDLL)
165 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("zlib"))
168 #pragma comment(lib, wxTOOLKIT_LIB_NAME("core"))
171 #pragma comment(lib, wxTOOLKIT_LIB_NAME("adv"))
174 #ifndef wxNO_HTML_LIB
175 #pragma comment(lib, wxTOOLKIT_LIB_NAME("html"))
177 #if wxUSE_GLCANVAS && !defined(wxNO_GL_LIB)
178 #pragma comment(lib, wxTOOLKIT_LIB_NAME("gl"))
180 #if wxUSE_DEBUGREPORT && !defined(wxNO_QA_LIB)
181 #pragma comment(lib, wxTOOLKIT_LIB_NAME("qa"))
183 #if wxUSE_XRC && !defined(wxNO_XRC_LIB)
184 #pragma comment(lib, wxTOOLKIT_LIB_NAME("xrc"))
186 #if wxUSE_AUI && !defined(wxNO_AUI_LIB)
187 #pragma comment(lib, wxTOOLKIT_LIB_NAME("aui"))
189 #if wxUSE_PROPGRID && !defined(wxNO_PROPGRID_LIB)
190 #pragma comment(lib, wxTOOLKIT_LIB_NAME("propgrid"))
192 #if wxUSE_RIBBON && !defined(wxNO_RIBBON_LIB)
193 #pragma comment(lib, wxTOOLKIT_LIB_NAME("ribbon"))
195 #if wxUSE_RICHTEXT && !defined(wxNO_RICHTEXT_LIB)
196 #pragma comment(lib, wxTOOLKIT_LIB_NAME("richtext"))
198 #if wxUSE_MEDIACTRL && !defined(wxNO_MEDIA_LIB)
199 #pragma comment(lib, wxTOOLKIT_LIB_NAME("media"))
201 #if wxUSE_STC && !defined(wxNO_STC_LIB)
202 #pragma comment(lib, wxTOOLKIT_LIB_NAME("stc"))
204 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("scintilla"))
207 #if wxUSE_WEBVIEW && !defined(wxNO_WEBVIEW_LIB)
208 #pragma comment(lib, wxTOOLKIT_LIB_NAME("webview"))
214 // Make sure all required system libraries are added to the linker too when
215 // using static libraries.
216 #pragma comment(lib, "kernel32")
217 #pragma comment(lib, "user32")
218 #pragma comment(lib, "gdi32")
219 #pragma comment(lib, "comdlg32")
220 #pragma comment(lib, "winspool")
221 #pragma comment(lib, "winmm")
222 #pragma comment(lib, "shell32")
223 #pragma comment(lib, "comctl32")
224 #pragma comment(lib, "ole32")
225 #pragma comment(lib, "oleaut32")
226 #pragma comment(lib, "uuid")
227 #pragma comment(lib, "rpcrt4")
228 #pragma comment(lib, "advapi32")
229 #pragma comment(lib, "wsock32")
231 #pragma comment(lib, "wininet")
235 #pragma comment(lib, "gtk-win32-2.0.lib")
236 #pragma comment(lib, "gdk-win32-2.0.lib")
237 #pragma comment(lib, "pangocairo-1.0.lib")
238 #pragma comment(lib, "gdk_pixbuf-2.0.lib")
239 #pragma comment(lib, "cairo.lib")
240 #pragma comment(lib, "pango-1.0.lib")
241 #pragma comment(lib, "gobject-2.0.lib")
242 #pragma comment(lib, "gthread-2.0.lib")
243 #pragma comment(lib, "glib-2.0.lib")
245 #endif // !WXUSINGDLL