]> git.saurik.com Git - wxWidgets.git/blob - include/msvc/wx/setup.h
Use correct directory names in msvc/wx/setup.h for 64 bit builds.
[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 #ifndef _MSC_VER
13 #error "This file should only be included when using Microsoft Visual C++"
14 #endif
15
16 // VC++ IDE predefines _DEBUG and _UNICODE for the new projects itself, but
17 // the other symbols (WXUSINGDLL, __WXUNIVERSAL__, ...) should be defined
18 // explicitly!
19
20 #include "wx/version.h"
21 #include "wx/cpp.h"
22
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
25 // need it
26 #ifdef _DEBUG
27 #define wxSUFFIX_DEBUG "d"
28 #ifdef _UNICODE
29 #define wxSUFFIX ud
30 #else // !_UNICODE
31 #define wxSUFFIX d
32 #endif // _UNICODE/!_UNICODE
33 #else
34 #define wxSUFFIX_DEBUG ""
35 #ifdef _UNICODE
36 #define wxSUFFIX u
37 #else // !_UNICODE
38 #define wxSUFFIX
39 #endif // _UNICODE/!_UNICODE
40 #endif
41
42 // compiler-specific prefix, we may use version-specific one in the future but
43 // for now it's just "vc" for all versions for compatibility
44 #define wxCOMPILER_PREFIX vc
45
46 // architecture-specific part: not used (again, for compatibility), for x86
47 #if defined(_M_X64)
48 #define wxARCH_SUFFIX _amd64
49 #elif defined(_M_IA64)
50 #define wxARCH_SUFFIX _ia64
51 #else // assume _M_IX86
52 #define wxARCH_SUFFIX
53 #endif
54
55 #ifdef WXUSINGDLL
56 #define wxLIB_SUBDIR wxCONCAT3(wxCOMPILER_PREFIX, wxARCH_SUFFIX, _dll)
57 #else // !DLL
58 #define wxLIB_SUBDIR wxCONCAT3(wxCOMPILER_PREFIX, wxARCH_SUFFIX, _lib)
59 #endif // DLL/!DLL
60
61
62 // the real setup.h header file we need is in the build-specific directory,
63 // construct the path to it
64 #define wxSETUPH_PATH \
65 wxCONCAT5(../../../lib/, wxLIB_SUBDIR, /msw, wxSUFFIX, /wx/setup.h)
66 #define wxSETUPH_PATH_STR wxSTRINGIZE(wxSETUPH_PATH)
67
68 #include wxSETUPH_PATH_STR
69
70
71 // the library names depend on the build, these macro builds the correct
72 // library name for the given base name
73 #define wxSUFFIX_STR wxSTRINGIZE(wxSUFFIX)
74 #define wxSHORT_VERSION_STRING \
75 wxSTRINGIZE(wxMAJOR_VERSION) wxSTRINGIZE(wxMINOR_VERSION)
76
77 #define wxWX_LIB_NAME(name, subname) \
78 "wx" name wxSHORT_VERSION_STRING wxSUFFIX_STR subname
79
80 #define wxBASE_LIB_NAME(name) wxWX_LIB_NAME("base", "_" name)
81 #define wxMSW_LIB_NAME(name) wxWX_LIB_NAME("msw", "_" name)
82
83 // this one is for 3rd party libraries: they don't have the version number
84 // in their names and usually exist in ANSI version only (except for regex)
85 #define wx3RD_PARTY_LIB_NAME(name) "wx" name wxSUFFIX_DEBUG
86
87 // special version for regex as it does have a Unicode version
88 #define wx3RD_PARTY_LIB_NAME_U(name) "wx" name wxSUFFIX_STR
89
90 #pragma comment(lib, wxWX_LIB_NAME("base", ""))
91
92 #ifndef wxNO_NET_LIB
93 #pragma comment(lib, wxBASE_LIB_NAME("net"))
94 #endif
95 #ifndef wxNO_XML_LIB
96 #pragma comment(lib, wxBASE_LIB_NAME("xml"))
97 #endif
98 #if wxUSE_REGEX && !defined(wxNO_REGEX_LIB)
99 #pragma comment(lib, wx3RD_PARTY_LIB_NAME_U("regex"))
100 #endif
101
102 #if wxUSE_GUI
103 #if wxUSE_XML && !defined(wxNO_EXPAT_LIB)
104 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("expat"))
105 #endif
106 #if wxUSE_LIBJPEG && !defined(wxNO_JPEG_LIB)
107 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("jpeg"))
108 #endif
109 #if wxUSE_LIBPNG && !defined(wxNO_PNG_LIB)
110 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("png"))
111 #endif
112 #if wxUSE_LIBTIFF && !defined(wxNO_TIFF_LIB)
113 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("tiff"))
114 #endif
115 #if wxUSE_ZLIB && !defined(wxNO_ZLIB_LIB)
116 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("zlib"))
117 #endif
118
119 #pragma comment(lib, wxMSW_LIB_NAME("core"))
120
121 #ifndef wxNO_ADV_LIB
122 #pragma comment(lib, wxMSW_LIB_NAME("adv"))
123 #endif
124
125 #ifndef wxNO_HTML_LIB
126 #pragma comment(lib, wxMSW_LIB_NAME("html"))
127 #endif
128 #if wxUSE_GLCANVAS && !defined(wxNO_GL_LIB)
129 #pragma comment(lib, wxMSW_LIB_NAME("gl"))
130 #endif
131 #if wxUSE_DEBUGREPORT && !defined(wxNO_QA_LIB)
132 #pragma comment(lib, wxMSW_LIB_NAME("qa"))
133 #endif
134 #if wxUSE_XRC && !defined(wxNO_XRC_LIB)
135 #pragma comment(lib, wxMSW_LIB_NAME("xrc"))
136 #endif
137 #if wxUSE_AUI && !defined(wxNO_AUI_LIB)
138 #pragma comment(lib, wxMSW_LIB_NAME("aui"))
139 #endif
140 #if wxUSE_PROPGRID && !defined(wxNO_PROPGRID_LIB)
141 #pragma comment(lib, wxMSW_LIB_NAME("propgrid"))
142 #endif
143 #if wxUSE_RIBBON && !defined(wxNO_RIBBON_LIB)
144 #pragma comment(lib, wxMSW_LIB_NAME("ribbon"))
145 #endif
146 #if wxUSE_RICHTEXT && !defined(wxNO_RICHTEXT_LIB)
147 #pragma comment(lib, wxMSW_LIB_NAME("richtext"))
148 #endif
149 #if wxUSE_MEDIACTRL && !defined(wxNO_MEDIA_LIB)
150 #pragma comment(lib, wxMSW_LIB_NAME("media"))
151 #endif
152 #if wxUSE_STC && !defined(wxNO_STC_LIB)
153 #pragma comment(lib, wxMSW_LIB_NAME("stc"))
154 #pragma comment(lib, wx3RD_PARTY_LIB_NAME("scintilla"))
155 #endif
156 #endif // wxUSE_GUI