]> git.saurik.com Git - wxWidgets.git/blob - include/msvc/wx/setup.h
Give wxCollapsiblePane's pane a name for easier debugging
[wxWidgets.git] / include / msvc / wx / setup.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: msvc/wx/msw/setup.h
3 // Purpose: wrapper around the real wx/setup.h for Visual C++
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 2004-12-12
7 // RCS-ID: $Id$
8 // Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org>
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // VC++ IDE predefines _DEBUG and _UNICODE for the new projects itself, but
13 // the other symbols (WXUSINGDLL, __WXUNIVERSAL__, ...) should be defined
14 // explicitly!
15
16 #ifdef _MSC_VER
17 #include "wx/version.h"
18 #include "wx/cpp.h"
19
20 // notice that wxSUFFIX_DEBUG is a string but wxSUFFIX itself must be an
21 // identifier as string concatenation is not done inside #include where we
22 // need it
23 #ifdef _DEBUG
24 #define wxSUFFIX_DEBUG "d"
25 #ifdef _UNICODE
26 #define wxSUFFIX ud
27 #else // !_UNICODE
28 #define wxSUFFIX d
29 #endif // _UNICODE/!_UNICODE
30 #else
31 #define wxSUFFIX_DEBUG ""
32 #ifdef _UNICODE
33 #define wxSUFFIX u
34 #else // !_UNICODE
35 #define wxSUFFIX
36 #endif // _UNICODE/!_UNICODE
37 #endif
38
39 #ifdef WXUSINGDLL
40 #define wxLIB_SUBDIR vc_dll
41 #else // !DLL
42 #define wxLIB_SUBDIR vc_lib
43 #endif // DLL/!DLL
44
45
46 // the real setup.h header file we need is in the build-specific directory,
47 // construct the path to it
48 #define wxSETUPH_PATH \
49 wxCONCAT5(../../../lib/, wxLIB_SUBDIR, /msw, wxSUFFIX, /wx/setup.h)
50 #define wxSETUPH_PATH_STR wxSTRINGIZE(wxSETUPH_PATH)
51
52 #include wxSETUPH_PATH_STR
53
54
55 // the library names depend on the build, these macro builds the correct
56 // library name for the given base name
57 #define wxSUFFIX_STR wxSTRINGIZE(wxSUFFIX)
58 #define wxSHORT_VERSION_STRING \
59 wxSTRINGIZE(wxMAJOR_VERSION) wxSTRINGIZE(wxMINOR_VERSION)
60
61 #define wxWX_LIB_NAME(name, subname) \
62 "wx" name wxSHORT_VERSION_STRING wxSUFFIX_STR subname
63
64 #define wxBASE_LIB_NAME(name) wxWX_LIB_NAME("base", "_" name)
65 #define wxMSW_LIB_NAME(name) wxWX_LIB_NAME("msw", "_" name)
66
67 // this one is for 3rd party libraries: they don't have the version number
68 // in their names and usually exist in ANSI version only (except for regex)
69 #define wx3RD_PARTY_LIB_NAME(name) "wx" name wxSUFFIX_DEBUG
70
71 // special version for regex as it does have a Unicode version
72 #define wx3RD_PARTY_LIB_NAME_U(name) "wx" name wxSUFFIX_STR
73
74 #pragma comment(lib, wxWX_LIB_NAME("base", ""))
75
76 #ifndef wxNO_NET_LIB
77 #pragma comment(lib, wxBASE_LIB_NAME("net"))
78 #endif
79 #ifndef wxNO_XML_LIB
80 #pragma comment(lib, wxBASE_LIB_NAME("xml"))
81 #endif
82 #if wxUSE_REGEX && !defined(wxNO_REGEX_LIB)
83 #pragma comment(lib, wx3RD_PARTY_LIB_NAME_U("regex"))
84 #endif
85
86 #if wxUSE_GUI
87 #if wxUSE_XML && !defined(wxNO_EXPAT_LIB)
88 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("expat"))
89 #endif
90 #if wxUSE_LIBJPEG && !defined(wxNO_JPEG_LIB)
91 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("jpeg"))
92 #endif
93 #if wxUSE_LIBPNG && !defined(wxNO_PNG_LIB)
94 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("png"))
95 #endif
96 #if wxUSE_LIBTIFF && !defined(wxNO_TIFF_LIB)
97 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("tiff"))
98 #endif
99 #if wxUSE_ZLIB && !defined(wxNO_ZLIB_LIB)
100 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("zlib"))
101 #endif
102
103 #pragma comment(lib, wxMSW_LIB_NAME("core"))
104
105 #ifndef wxNO_ADV_LIB
106 #pragma comment(lib, wxMSW_LIB_NAME("adv"))
107 #endif
108
109 #ifndef wxNO_HTML_LIB
110 #pragma comment(lib, wxMSW_LIB_NAME("html"))
111 #endif
112 #if wxUSE_GLCANVAS && !defined(wxNO_GL_LIB)
113 #pragma comment(lib, wxMSW_LIB_NAME("gl"))
114 #endif
115 #if wxUSE_DEBUGREPORT && !defined(wxNO_QA_LIB)
116 #pragma comment(lib, wxMSW_LIB_NAME("qa"))
117 #endif
118 #if wxUSE_XRC && !defined(wxNO_XRC_LIB)
119 #pragma comment(lib, wxMSW_LIB_NAME("xrc"))
120 #endif
121 #if wxUSE_AUI && !defined(wxNO_AUI_LIB)
122 #pragma comment(lib, wxMSW_LIB_NAME("aui"))
123 #endif
124 #if wxUSE_RICHTEXT && !defined(wxNO_RICHTEXT_LIB)
125 #pragma comment(lib, wxMSW_LIB_NAME("richtext"))
126 #endif
127 #if wxUSE_MEDIACTRL && !defined(wxNO_MEDIA_LIB)
128 #pragma comment(lib, wxMSW_LIB_NAME("media"))
129 #endif
130 #endif // wxUSE_GUI
131 #else
132 #error "This file should only be included when using Microsoft Visual C++"
133 #endif
134