Fix preprocessor definitions for wxBase build under OS X.
Define __WXOSX__ for non-GUI build under Darwin. Ensure that the rest of the code compiles correctly when just __WXOSX__ is defined but neither of __WXOSX_{CARBON,COCOA,IPHONE}__ is. This ensures that wxBase can actually be built under Mac. Move OS X symbols definitions in wx/platform.h after wx/setup.h inclusion as they rely on __DARWIN__ and wxUSE_GUI values which are both define in that file now. Still keep them before wx/chkconf.h inclusion which relies on __WXOSX_XXX__ being defined. Yes, it's a mess and should be cleaned up more permanently some day. Also remove some redundancy from wx/osx/{carbon,cocoa}/private.h by factoring out common parts into wx/osx/core/private.h. Also include this header itself from wx/osx/private.h directly instead of including it thrice from different sub-ports headers. Closes #12660. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,18 +1,16 @@
|
||||
/* common warning snippet for all osx direct includes */
|
||||
|
||||
#ifndef wxOSX_USE_CARBON
|
||||
#error "this files should only be included after platform.h was included"
|
||||
#endif
|
||||
|
||||
#ifndef _WX_PRIVATE_OSX_H_
|
||||
#define _WX_PRIVATE_OSX_H_
|
||||
|
||||
#include "wx/osx/core/private.h"
|
||||
|
||||
#if wxOSX_USE_IPHONE
|
||||
#include "wx/osx/iphone/private.h"
|
||||
#elif wxOSX_USE_CARBON
|
||||
#include "wx/osx/carbon/private.h"
|
||||
#elif wxOSX_USE_COCOA
|
||||
#include "wx/osx/cocoa/private.h"
|
||||
#elif wxUSE_GUI
|
||||
#error "Must include wx/defs.h first"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user