From d273f4219b5cdf53405424a11b07937876ba9e69 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 24 Oct 2025 17:14:54 +0200 Subject: [PATCH 12/48] use proper preproc constants to allow private include for non-osx toolkit builds --- include/wx/osx/core/private.h | 6 +++--- include/wx/osx/private.h | 8 +++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/include/wx/osx/core/private.h b/include/wx/osx/core/private.h index b4f82ba4df..05ac7878e6 100644 --- a/include/wx/osx/core/private.h +++ b/include/wx/osx/core/private.h @@ -66,9 +66,9 @@ WXDLLIMPEXP_BASE NSString* wxNSStringWithWxString(const wxString &wxstring); WXDLLIMPEXP_BASE CFURLRef wxOSXCreateURLFromFileSystemPath( const wxString& path); -#if wxUSE_GUI +#ifdef __WXOSX__ -#if !wxOSX_USE_IPHONE +#if !defined(__WXOSX_IPHONE__) #include #endif @@ -1050,7 +1050,7 @@ protected : wxDECLARE_ABSTRACT_CLASS(wxNonOwnedWindowImpl); }; -#endif // wxUSE_GUI +#endif // __WXOSX__ //--------------------------------------------------------------------------- // cocoa bridging utilities diff --git a/include/wx/osx/private.h b/include/wx/osx/private.h index 30a3a84f7c..afc35adc61 100644 --- a/include/wx/osx/private.h +++ b/include/wx/osx/private.h @@ -7,8 +7,14 @@ #include "wx/osx/iphone/private.h" #elif defined(__WXOSX_COCOA__) #include "wx/osx/cocoa/private.h" -#elif wxUSE_GUI +#elif defined(__WXOSX__) #error "Must include wx/defs.h first" +#else + #include + + #ifdef __OBJC__ + #import + #endif #endif #endif -- 2.24.3 (Apple Git-128)