Merge branch 'osx-10_10-min-10_11-SDK' of csomor/wxWidgets

Increase minimum required macOS SDK version to 10.11 and minimum support
macOS deployment version to 10.10.

See https://github.com/wxWidgets/wxWidgets/pull/1929
This commit is contained in:
Vadim Zeitlin
2020-07-06 00:08:44 +02:00
21 changed files with 126 additions and 125 deletions

View File

@@ -34,7 +34,7 @@ matrix:
- os: osx - os: osx
osx_image: xcode7.3 osx_image: xcode7.3
compiler: clang compiler: clang
env: wxCONFIGURE_FLAGS="--enable-cxx11" wxMAKEFILE_FLAGS="CXXFLAGS=-std=c++11" wxSKIP_SAMPLES=1 env: wxSKIP_SAMPLES=1
name: wxOSX Xcode 7.3 name: wxOSX Xcode 7.3
- os: osx - os: osx
osx_image: xcode9.4 osx_image: xcode9.4

View File

@@ -29,7 +29,7 @@ endif()
if(APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET) if(APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
# If no deployment target has been set default to the minimum supported # If no deployment target has been set default to the minimum supported
# OS X version (this has to be set before the first project() call) # OS X version (this has to be set before the first project() call)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9 CACHE STRING "OS X Deployment Target") set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10 CACHE STRING "macOS Deployment Target")
endif() endif()
include(build/cmake/policies.cmake NO_POLICY_SCOPE) include(build/cmake/policies.cmake NO_POLICY_SCOPE)

View File

@@ -77,14 +77,6 @@ endmacro()
function(wx_set_common_target_properties target_name) function(wx_set_common_target_properties target_name)
cmake_parse_arguments(wxCOMMON_TARGET_PROPS "DEFAULT_WARNINGS" "" "" ${ARGN}) cmake_parse_arguments(wxCOMMON_TARGET_PROPS "DEFAULT_WARNINGS" "" "" ${ARGN})
if(APPLE AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9 AND wxHAS_CXX11)
if(CMAKE_GENERATOR STREQUAL "Xcode")
set_target_properties(${target_name} PROPERTIES XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY libc++)
else()
target_compile_options(${target_name} PUBLIC "-stdlib=libc++")
target_link_libraries(${target_name} PRIVATE "-stdlib=libc++")
endif()
endif()
set_target_properties(${target_name} PROPERTIES set_target_properties(${target_name} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}${wxPLATFORM_LIB_DIR}" LIBRARY_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}${wxPLATFORM_LIB_DIR}"
ARCHIVE_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}${wxPLATFORM_LIB_DIR}" ARCHIVE_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}${wxPLATFORM_LIB_DIR}"

View File

@@ -11,11 +11,6 @@
if(DEFINED wxBUILD_CXX_STANDARD AND NOT wxBUILD_CXX_STANDARD STREQUAL COMPILER_DEFAULT) if(DEFINED wxBUILD_CXX_STANDARD AND NOT wxBUILD_CXX_STANDARD STREQUAL COMPILER_DEFAULT)
set(CMAKE_CXX_STANDARD ${wxBUILD_CXX_STANDARD}) set(CMAKE_CXX_STANDARD ${wxBUILD_CXX_STANDARD})
endif() endif()
if(NOT CMAKE_CXX_STANDARD EQUAL 98)
set(wxHAS_CXX11 TRUE)
else()
set(wxHAS_CXX11 FALSE)
endif()
if(MSVC) if(MSVC)
# Determine MSVC runtime library flag # Determine MSVC runtime library flag

View File

@@ -23,10 +23,6 @@ include(CheckTypeSize)
include(CMakePushCheckState) include(CMakePushCheckState)
include(TestBigEndian) include(TestBigEndian)
if(APPLE AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9 AND wxHAS_CXX11)
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-stdlib=libc++")
endif()
# Add a definition to setup.h and append it to a list of defines for # Add a definition to setup.h and append it to a list of defines for
# for compile checks # for compile checks
macro(wx_setup_definition def) macro(wx_setup_definition def)
@@ -143,7 +139,7 @@ wx_check_c_source_compiles(
stdio.h stdio.h
) )
#TODO: wxNO_VARIADIC_MACROS #TODO: wxNO_VARIADIC_MACROS
if(wxUSE_STL AND NOT wxHAS_CXX11) if(wxUSE_STL AND CMAKE_CXX_STANDARD EQUAL 98)
wx_check_cxx_source_compiles(" wx_check_cxx_source_compiles("
std::vector<int> moo; std::vector<int> moo;
std::list<int> foo; std::list<int> foo;

72
configure vendored
View File

@@ -1028,7 +1028,6 @@ infodir
docdir docdir
oldincludedir oldincludedir
includedir includedir
runstatedir
localstatedir localstatedir
sharedstatedir sharedstatedir
sysconfdir sysconfdir
@@ -1455,7 +1454,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc' sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com' sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var' localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include' includedir='${prefix}/include'
oldincludedir='/usr/include' oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1708,15 +1706,6 @@ do
| -silent | --silent | --silen | --sile | --sil) | -silent | --silent | --silen | --sile | --sil)
silent=yes ;; silent=yes ;;
-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;; ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1854,7 +1843,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \ datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir runstatedir libdir localedir mandir
do do
eval ac_val=\$$ac_var eval ac_val=\$$ac_var
# Remove trailing slashes. # Remove trailing slashes.
@@ -2007,7 +1996,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var] --localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib] --libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include] --includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include] --oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -2322,9 +2310,9 @@ Optional Packages:
--with-themes=all|list use only the specified comma-separated list of wxUniversal themes --with-themes=all|list use only the specified comma-separated list of wxUniversal themes
--with-gtk[=VERSION] use GTK+, VERSION can be 3 (default), 2, 1 or "any" --with-gtk[=VERSION] use GTK+, VERSION can be 3 (default), 2, 1 or "any"
--with-motif use Motif/Lesstif --with-motif use Motif/Lesstif
--with-osx_cocoa use Mac OS X (Cocoa) --with-osx_cocoa use macOS (Cocoa)
--with-osx_iphone use iPhone OS X port --with-osx_iphone use iOS
--with-osx use Mac OS X (default port, Cocoa) --with-osx use macOS (default port, Cocoa)
--with-cocoa same as --with-osx_cocoa --with-cocoa same as --with-osx_cocoa
--with-iphone same as --with-osx_iphone --with-iphone same as --with-osx_iphone
--with-mac same as --with-osx --with-mac same as --with-osx
@@ -2352,8 +2340,8 @@ Optional Packages:
--with-liblzma use LZMA compression) --with-liblzma use LZMA compression)
--with-zlib use zlib for LZW compression --with-zlib use zlib for LZW compression
--with-expat enable XML support using expat parser --with-expat enable XML support using expat parser
--with-macosx-sdk=PATH use an OS X SDK at PATH --with-macosx-sdk=PATH use macOS SDK at PATH
--with-macosx-version-min=VER build binaries which require at least this OS X version --with-macosx-version-min=VER build binaries requiring at least this macOS version (default and lowest supported: 10.10)
--with-cxx=11|14|17 use the given C++ dialect --with-cxx=11|14|17 use the given C++ dialect
--with-gtk-prefix=PFX Prefix where GTK is installed (optional) --with-gtk-prefix=PFX Prefix where GTK is installed (optional)
--with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional) --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)
@@ -15164,6 +15152,10 @@ if test "$CXX" = "g++" -a "$GXX" != "yes"; then
as_fn_error $? "C++ compiler is needed to build wxWidgets" "$LINENO" 5 as_fn_error $? "C++ compiler is needed to build wxWidgets" "$LINENO" 5
fi fi
if test "$wxUSE_MAC" = 1 -a -z "$wxWITH_CXX"; then
wxWITH_CXX=11
fi
if test -n "$wxWITH_CXX"; then if test -n "$wxWITH_CXX"; then
case "$wxWITH_CXX" in case "$wxWITH_CXX" in
11) 11)
@@ -18650,6 +18642,8 @@ if test "x$wxUSE_MACOSX_SDK" = "xno"; then
wxUSE_MACOSX_SDK= wxUSE_MACOSX_SDK=
elif test "x$wxUSE_MACOSX_SDK" = "xyes"; then elif test "x$wxUSE_MACOSX_SDK" = "xyes"; then
wxUSE_MACOSX_SDK="`xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" wxUSE_MACOSX_SDK="`xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
elif test "x$wxUSE_MACOSX_SDK" != "x"; then
macosx_sdk_specified=yes
fi fi
@@ -18699,7 +18693,9 @@ $as_echo "$as_me: WARNING: Could not determine deployment target from SDKSetting
wxUSE_MACOSX_VERSION_MIN= wxUSE_MACOSX_VERSION_MIN=
fi fi
elif test "x$wxUSE_MACOSX_VERSION_MIN" = "x"; then elif test "x$wxUSE_MACOSX_VERSION_MIN" = "x"; then
wxUSE_MACOSX_VERSION_MIN=10.9 wxUSE_MACOSX_VERSION_MIN=10.10
else
macosx_minver_specified=yes
fi fi
if test "x$MACOSX_SDK_OPTS" != "x"; then if test "x$MACOSX_SDK_OPTS" != "x"; then
@@ -18723,11 +18719,19 @@ if test "x$wxUSE_MACOSX_VERSION_MIN" != "x"; then
retest_macosx_linking=yes retest_macosx_linking=yes
fi fi
if test "$HAVE_CXX11" = "1" ; then
eval "CXX=\"$CXX -stdlib=libc++\""
fi
if test "x$retest_macosx_linking" = "xyes"; then if test "x$retest_macosx_linking" = "xyes"; then
if test "x$macosx_sdk_specified" = "xyes"; then
error_message="try using --with-macosx-sdk with a different SDK or \
omitting it entirely to use the default one."
elif test "x$macosx_minver_specified" = "xyes"; then
error_message="try using --with-macosx-version-min with a different OS \
version or omitting it entirely."
else
error_message="check that command line tools from Xcode 7.2.1 or later are installed."
fi
error_message="building C++ programs doesn't work, $error_message"
ac_ext=c ac_ext=c
ac_cpp='$CPP $CPPFLAGS' ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -18753,8 +18757,8 @@ $as_echo "yes" >&6; }
else else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no. Try a different SDK as_fn_error $? "$error_message
See \`config.log' for more details" "$LINENO" 5; }; exit 1 See \`config.log' for more details" "$LINENO" 5; }
fi fi
rm -f core conftest.err conftest.$ac_objext \ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext conftest$ac_exeext conftest.$ac_ext
@@ -18776,10 +18780,23 @@ $as_echo_n "checking if C++ compiler ($CXX) works with SDK/version options... "
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <Availability.h>
int int
main () main ()
{ {
#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101000
#error macOS versions < 10.10 are not supported.
#endif
#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101100
#error macOS SDK version is too low, 10.11 or later is required.
#endif
#elif !defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
#error unrecognized platform
#endif
; ;
return 0; return 0;
} }
@@ -18790,8 +18807,9 @@ $as_echo "yes" >&6; }
else else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no. Try a different SDK as_fn_error $? "$error_message
See \`config.log' for more details" "$LINENO" 5; }; exit 1 See \`config.log' for more details" "$LINENO" 5; }
fi fi
rm -f core conftest.err conftest.$ac_objext \ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext conftest$ac_exeext conftest.$ac_ext

View File

@@ -81,7 +81,7 @@ USE_MAC=0
dnl Unix kind dnl Unix kind
USE_AIX= USE_AIX=
USE_BSD= dnl any BSD USE_BSD= dnl any BSD
USE_DARWIN= dnl a.k.a. Mac OS X USE_DARWIN= dnl a.k.a. macOS
USE_FREEBSD= USE_FREEBSD=
USE_GNU= dnl GNU/Hurd USE_GNU= dnl GNU/Hurd
USE_HPUX= USE_HPUX=
@@ -429,9 +429,9 @@ dnl we use AC_ARG_WITH and not WX_ARG_WITH for the toolkit options as they
dnl shouldn't default to wxUSE_ALL_FEATURES dnl shouldn't default to wxUSE_ALL_FEATURES
AC_ARG_WITH(gtk, [[ --with-gtk[=VERSION] use GTK+, VERSION can be 3 (default), 2, 1 or "any"]], [wxUSE_GTK="$withval" CACHE_GTK=1 TOOLKIT_GIVEN=1]) AC_ARG_WITH(gtk, [[ --with-gtk[=VERSION] use GTK+, VERSION can be 3 (default), 2, 1 or "any"]], [wxUSE_GTK="$withval" CACHE_GTK=1 TOOLKIT_GIVEN=1])
WX_ARG_ONLY_WITH(motif, [ --with-motif use Motif/Lesstif], [wxUSE_MOTIF="$withval" CACHE_MOTIF=1 TOOLKIT_GIVEN=1]) WX_ARG_ONLY_WITH(motif, [ --with-motif use Motif/Lesstif], [wxUSE_MOTIF="$withval" CACHE_MOTIF=1 TOOLKIT_GIVEN=1])
WX_ARG_ONLY_WITH(osx_cocoa, [ --with-osx_cocoa use Mac OS X (Cocoa)], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1]) WX_ARG_ONLY_WITH(osx_cocoa, [ --with-osx_cocoa use macOS (Cocoa)], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1])
WX_ARG_ONLY_WITH(osx_iphone, [ --with-osx_iphone use iPhone OS X port], [wxUSE_OSX_IPHONE="$withval" CACHE_OSX_IPHONE=1 TOOLKIT_GIVEN=1]) WX_ARG_ONLY_WITH(osx_iphone, [ --with-osx_iphone use iOS], [wxUSE_OSX_IPHONE="$withval" CACHE_OSX_IPHONE=1 TOOLKIT_GIVEN=1])
WX_ARG_ONLY_WITH(osx, [ --with-osx use Mac OS X (default port, Cocoa)], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1]) WX_ARG_ONLY_WITH(osx, [ --with-osx use macOS (default port, Cocoa)], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1])
WX_ARG_ONLY_WITH(cocoa, [ --with-cocoa same as --with-osx_cocoa], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1]) WX_ARG_ONLY_WITH(cocoa, [ --with-cocoa same as --with-osx_cocoa], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1])
WX_ARG_ONLY_WITH(iphone, [ --with-iphone same as --with-osx_iphone], [wxUSE_OSX_IPHONE="$withval" CACHE_OSX_IPHONE=1 TOOLKIT_GIVEN=1]) WX_ARG_ONLY_WITH(iphone, [ --with-iphone same as --with-osx_iphone], [wxUSE_OSX_IPHONE="$withval" CACHE_OSX_IPHONE=1 TOOLKIT_GIVEN=1])
WX_ARG_ONLY_WITH(mac, [ --with-mac same as --with-osx], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1]) WX_ARG_ONLY_WITH(mac, [ --with-mac same as --with-osx], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1])
@@ -577,12 +577,12 @@ WX_ARG_SYS_WITH(expat, [ --with-expat enable XML support using e
if test "$USE_DARWIN" = 1; then if test "$USE_DARWIN" = 1; then
AC_ARG_WITH(macosx-sdk, [ --with-macosx-sdk=PATH use an OS X SDK at PATH], [ AC_ARG_WITH(macosx-sdk, [ --with-macosx-sdk=PATH use macOS SDK at PATH], [
wxUSE_MACOSX_SDK=$withval wxUSE_MACOSX_SDK=$withval
wx_cv_use_macosx_sdk="wxUSE_MACOSX_SDK=$withval" wx_cv_use_macosx_sdk="wxUSE_MACOSX_SDK=$withval"
]) ])
AC_ARG_WITH(macosx-version-min, [ --with-macosx-version-min=VER build binaries which require at least this OS X version], [ AC_ARG_WITH(macosx-version-min, [ --with-macosx-version-min=VER build binaries requiring at least this macOS version (default and lowest supported: 10.10)], [
wxUSE_MACOSX_VERSION_MIN=$withval wxUSE_MACOSX_VERSION_MIN=$withval
wx_cv_use_macosx_version_min="wxUSE_MACOSX_VERSION_MIN=$withval" wx_cv_use_macosx_version_min="wxUSE_MACOSX_VERSION_MIN=$withval"
]) ])
@@ -1098,6 +1098,13 @@ if test "$CXX" = "g++" -a "$GXX" != "yes"; then
AC_MSG_ERROR([C++ compiler is needed to build wxWidgets]) AC_MSG_ERROR([C++ compiler is needed to build wxWidgets])
fi fi
dnl Always use C++11 under macOS, there are no supported compilers not
dnl supporting it there, but don't prevent a latest version of C++ from being
dnl used.
if test "$wxUSE_MAC" = 1 -a -z "$wxWITH_CXX"; then
wxWITH_CXX=11
fi
if test -n "$wxWITH_CXX"; then if test -n "$wxWITH_CXX"; then
dnl AX_CXX_COMPILE_STDCXX requires its VERSION argument to be specified at dnl AX_CXX_COMPILE_STDCXX requires its VERSION argument to be specified at
dnl autoconf, not run, time. dnl autoconf, not run, time.
@@ -1253,6 +1260,8 @@ if test "x$wxUSE_MACOSX_SDK" = "xno"; then
elif test "x$wxUSE_MACOSX_SDK" = "xyes"; then elif test "x$wxUSE_MACOSX_SDK" = "xyes"; then
dnl Try to use the default SDK. dnl Try to use the default SDK.
wxUSE_MACOSX_SDK="`xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" wxUSE_MACOSX_SDK="`xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
elif test "x$wxUSE_MACOSX_SDK" != "x"; then
macosx_sdk_specified=yes
fi fi
@@ -1304,7 +1313,9 @@ dnl We need to quote the next line where we don't need macros and do need [] in
wxUSE_MACOSX_VERSION_MIN= wxUSE_MACOSX_VERSION_MIN=
fi fi
elif test "x$wxUSE_MACOSX_VERSION_MIN" = "x"; then elif test "x$wxUSE_MACOSX_VERSION_MIN" = "x"; then
wxUSE_MACOSX_VERSION_MIN=10.9 wxUSE_MACOSX_VERSION_MIN=10.10
else
macosx_minver_specified=yes
fi fi
if test "x$MACOSX_SDK_OPTS" != "x"; then if test "x$MACOSX_SDK_OPTS" != "x"; then
@@ -1328,27 +1339,48 @@ if test "x$wxUSE_MACOSX_VERSION_MIN" != "x"; then
retest_macosx_linking=yes retest_macosx_linking=yes
fi fi
if test "$HAVE_CXX11" = "1" ; then
dnl We also need to use libc++ standard library instead of libstdc++ for
dnl C++11 support, both when compiling (for both C++ and Objective-C++, so
dnl putting this in just CXXFLAGS wouldn't be enough) and when linking
dnl (both libraries and plugins, using bakefile shared-ld-sh script which
dnl doesn't handle this option, so putting it in LDFLAGS wouldn't work).
eval "CXX=\"$CXX -stdlib=libc++\""
fi
dnl If either an SDK or a version option was added, make sure that we can dnl If either an SDK or a version option was added, make sure that we can
dnl still compile and link both C and C++. If we didn't do this, then most dnl still compile and link both C and C++. If we didn't do this, then most
dnl of the remaining tests would fail. dnl of the remaining tests would fail.
if test "x$retest_macosx_linking" = "xyes"; then if test "x$retest_macosx_linking" = "xyes"; then
if test "x$macosx_sdk_specified" = "xyes"; then
error_message="try using --with-macosx-sdk with a different SDK or \
omitting it entirely to use the default one."
elif test "x$macosx_minver_specified" = "xyes"; then
error_message="try using --with-macosx-version-min with a different OS \
version or omitting it entirely."
else
error_message="check that command line tools from Xcode 7.2.1 or later are installed."
fi
error_message="building C++ programs doesn't work, $error_message"
AC_LANG_PUSH(C) AC_LANG_PUSH(C)
AC_MSG_CHECKING([if C compiler ($CC) works with SDK/version options]) AC_MSG_CHECKING([if C compiler ($CC) works with SDK/version options])
AC_TRY_LINK([],[],[AC_MSG_RESULT([yes])],[AC_MSG_FAILURE([no. Try a different SDK]); exit 1]) AC_TRY_LINK([],[],[AC_MSG_RESULT([yes])],[AC_MSG_FAILURE([$error_message])])
AC_LANG_POP() AC_LANG_POP()
AC_LANG_PUSH(C++) AC_LANG_PUSH(C++)
AC_MSG_CHECKING([if C++ compiler ($CXX) works with SDK/version options]) AC_MSG_CHECKING([if C++ compiler ($CXX) works with SDK/version options])
AC_TRY_LINK([],[],[AC_MSG_RESULT([yes])],[AC_MSG_FAILURE([no. Try a different SDK]); exit 1]) AC_TRY_LINK(
[
#include <Availability.h>
],
[
#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101000
#error macOS versions < 10.10 are not supported.
#endif
#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101100
#error macOS SDK version is too low, 10.11 or later is required.
#endif
#elif !defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
#error unrecognized platform
#endif
],
[AC_MSG_RESULT([yes])],
[AC_MSG_FAILURE([$error_message])]
)
AC_LANG_POP() AC_LANG_POP()
fi fi

View File

@@ -152,9 +152,8 @@ Changes in behaviour which may result in build errors
wxArrayString. Please update your code to use the appropriate setter wxArrayString. Please update your code to use the appropriate setter
Set[Char]{In,Ex}cludes(), instead of mutating the internal data directly. Set[Char]{In,Ex}cludes(), instead of mutating the internal data directly.
- Under macOS, 10.9 SDK is used by default now. 10.7 SDK is still supported, - Under macOS, 10.11 SDK is the minimum SDK, building and deploying under 10.10.5 and
but must be explicitly selected (and libstdc++ must be installed in order higher is supported, you must use at least Xcode 7.2.1.
to use it).
- wxPGProperty ctors are not longer public since this class is intended to be - wxPGProperty ctors are not longer public since this class is intended to be
a base class and should not be instantiated directly. a base class and should not be instantiated directly.
@@ -802,7 +801,7 @@ wxMSW:
wxOSX/Cocoa: wxOSX/Cocoa:
- Make wxiOS (iPhone) port build and minimally work again (Tobias Taschner). - Make wxiOS (iPhone) port build and minimally work again (Tobias Taschner).
- Use more efficient FSEvents (10.7+) in wxFileSystemWatcher (Roberto Perpuly). - Use more efficient FSEvents in wxFileSystemWatcher (Roberto Perpuly).
- Implement wxWindow::Disable() for non-native controls too (Steve Browne). - Implement wxWindow::Disable() for non-native controls too (Steve Browne).
- Implement wxTopLevelWindow::EnableCloseButton() (John Roberts). - Implement wxTopLevelWindow::EnableCloseButton() (John Roberts).
- Fix wxEVT_CHAR for non-BMP Unicode characters (ARATA Mizuki). - Fix wxEVT_CHAR for non-BMP Unicode characters (ARATA Mizuki).

View File

@@ -91,10 +91,10 @@ NetBSD, Solaris, AIX, ...) and require GTK+ 2.6 or later or GTK+ 3.x. The
primary supported compiler is GNU g++. primary supported compiler is GNU g++.
@li wxOSX/Cocoa: This is the native port for Apple computers. wxOSX/Cocoa @li wxOSX/Cocoa: This is the native port for Apple computers. wxOSX/Cocoa
supports 32 or 64 bit Intel Macs running macOS 10.7 or later. The port can be supports 32 or 64 bit Intel Macs running macOS 10.10 or later. The port can be
built either with g++ or clang. built either with g++ or clang.
Other platforms (e.g. iOS - with a minimum requirement of iOS 9), compilers (Borland C++ Other platforms (e.g. iOS - with a minimum requirement of iOS 13), compilers (Borland C++
under Windows, Sun CC, HP-UX aCC, IBM xlC or SGI mipsPro under Unix) and ports ( under Windows, Sun CC, HP-UX aCC, IBM xlC or SGI mipsPro under Unix) and ports (
wxQT, wxGTK1, wxX11, wxDFB...) are also supported but to a lesser extent. wxQT, wxGTK1, wxX11, wxDFB...) are also supported but to a lesser extent.
Please see the @subpage page_port "platform details page" for more information. Please see the @subpage page_port "platform details page" for more information.

View File

@@ -53,7 +53,7 @@ starting with 3.1.4. Use @c configure option @c \--with-gtk=2 to use GTK 2.
@section page_port_wxosx wxOSX/Cocoa @section page_port_wxosx wxOSX/Cocoa
wxOSX/Cocoa is the port of wxWidgets for the macOS platform. It requires wxOSX/Cocoa is the port of wxWidgets for the macOS platform. It requires
macOS 10.7 or later and fully supports 64 bit builds. macOS 10.10 or later, Xcode 7.2.1 or greater, and fully supports 64 bit builds.
@subpage plat_osx_install "Build and Install Instructions" @subpage plat_osx_install "Build and Install Instructions"

View File

@@ -97,7 +97,7 @@ This version of wxWidgets supports the following primary platforms:
* Windows XP, Vista, 7, 8 and 10 (32/64 bits). * Windows XP, Vista, 7, 8 and 10 (32/64 bits).
* Most Unix variants using the GTK+ toolkit (version 2.6 or newer) * Most Unix variants using the GTK+ toolkit (version 2.6 or newer)
* macOS (10.7 or newer) using Cocoa (32/64 bits) * macOS (10.10 or newer) using Cocoa (32/64 bits)
There is some support for the following platforms: There is some support for the following platforms:

View File

@@ -755,8 +755,7 @@ public:
std::locale::global(std::locale("")); std::locale::global(std::locale(""));
@endcode @endcode
but be warned that locale support in C++ standard library can be poor but be warned that locale support in C++ standard library can be poor
or worse under some platforms, e.g. the above line results in an or worse under some platforms.
immediate crash under macOS up to the version 10.8.2.
@since 2.9.5 @since 2.9.5
*/ */

View File

@@ -85,7 +85,7 @@ public:
Additionally a file mask can be specified to include only files Additionally a file mask can be specified to include only files
matching that particular mask. matching that particular mask.
This method is implemented efficiently on MSW and macOS >= 10.7, but This method is implemented efficiently on MSW and macOS, but
should be used with care on other platforms for directories with lots should be used with care on other platforms for directories with lots
of children (e.g. the root directory) as it calls Add() for each of children (e.g. the root directory) as it calls Add() for each
subdirectory, potentially creating a lot of watches and taking a long subdirectory, potentially creating a lot of watches and taking a long

View File

@@ -274,7 +274,7 @@ public:
/** /**
Return the name if available or empty string otherwise. Return the name if available or empty string otherwise.
This is currently only implemented for macOS 10.9 or later and returns This is currently only implemented for macOS and returns
a not necessarily user-readable string such as "NSAppearanceNameAqua" a not necessarily user-readable string such as "NSAppearanceNameAqua"
there and an empty string under all the other platforms. there and an empty string under all the other platforms.
*/ */

View File

@@ -646,9 +646,8 @@ public:
under another OS. under another OS.
@note Having the button is also required to let ShowFullScreen() @note Having the button is also required to let ShowFullScreen()
make use of the full screen API available since macOS 10.7: a full make use of the full screen API: a full screen window gets its own space
screen window gets its own space and entering and exiting the mode and entering and exiting the mode is animated.
is animated.
If the button is not present the old way of switching to full screen If the button is not present the old way of switching to full screen
is used. is used.

View File

@@ -30,12 +30,6 @@
#define DEBUG_WEBKIT_SIZING 0 #define DEBUG_WEBKIT_SIZING 0
#if defined(MAC_OS_X_VERSION_10_11) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11)
#define wxWEBKIT_PROTOCOL_SINCE_10_11(proto) < proto >
#else
#define wxWEBKIT_PROTOCOL_SINCE_10_11(proto)
#endif
extern WXDLLEXPORT_DATA(const char) wxWebKitCtrlNameStr[] = "webkitctrl"; extern WXDLLEXPORT_DATA(const char) wxWebKitCtrlNameStr[] = "webkitctrl";
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -114,7 +108,7 @@ inline int wxNavTypeFromWebNavType(int type){
return wxWEBKIT_NAV_OTHER; return wxWEBKIT_NAV_OTHER;
} }
@interface MyFrameLoadMonitor : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebFrameLoadDelegate) @interface MyFrameLoadMonitor : NSObject<WebFrameLoadDelegate>
{ {
wxWebKitCtrl* webKitWindow; wxWebKitCtrl* webKitWindow;
} }
@@ -123,7 +117,7 @@ inline int wxNavTypeFromWebNavType(int type){
@end @end
@interface MyPolicyDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebPolicyDelegate) @interface MyPolicyDelegate : NSObject<WebPolicyDelegate>
{ {
wxWebKitCtrl* webKitWindow; wxWebKitCtrl* webKitWindow;
} }
@@ -132,7 +126,7 @@ inline int wxNavTypeFromWebNavType(int type){
@end @end
@interface MyUIDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebUIDelegate) @interface MyUIDelegate : NSObject<WebUIDelegate>
{ {
wxWebKitCtrl* webKitWindow; wxWebKitCtrl* webKitWindow;
} }

View File

@@ -3035,14 +3035,10 @@ bool wxDataViewTextRenderer::MacRender()
[par setLineBreakMode:[cell lineBreakMode]]; [par setLineBreakMode:[cell lineBreakMode]];
// Tightening looks very ugly when combined with non-tightened rows, // Tightening looks very ugly when combined with non-tightened rows,
// so disabled it on OS X version where it's used: // so disabled it on OS X version where it's used:
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11
if ( WX_IS_MACOS_AVAILABLE(10, 11) ) if ( WX_IS_MACOS_AVAILABLE(10, 11) )
{
[par setAllowsDefaultTighteningForTruncation:NO]; [par setAllowsDefaultTighteningForTruncation:NO];
}
else else
#endif [par setTighteningFactorForTruncation:0.0];
[par setTighteningFactorForTruncation:0.0];
[str addAttribute:NSParagraphStyleAttributeName [str addAttribute:NSParagraphStyleAttributeName
value:par value:par

View File

@@ -2828,15 +2828,7 @@ bool wxWidgetCocoaImpl::ShowWithEffect(bool show,
return ShowViewOrWindowWithEffect(m_wxPeer, show, effect, timeout); return ShowViewOrWindowWithEffect(m_wxPeer, show, effect, timeout);
} }
// To avoid warnings about incompatible pointer types with OS X 10.11 SDK (and
// maybe even earlier? This has changed at some time between 10.9 and 10.11),
// we need to constrain the comparison function arguments instead of just using
// "id".
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11 && __has_feature(objc_kindof)
typedef __kindof NSView* KindOfView; typedef __kindof NSView* KindOfView;
#else
typedef id KindOfView;
#endif
class CocoaWindowCompareContext class CocoaWindowCompareContext
{ {

View File

@@ -118,7 +118,6 @@ wxCGColorRefData::wxCGColorRefData(CGColorRef col)
} }
else if (model != kCGColorSpaceModelRGB) else if (model != kCGColorSpaceModelRGB)
{ {
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11
if ( WX_IS_MACOS_AVAILABLE(10, 11) ) if ( WX_IS_MACOS_AVAILABLE(10, 11) )
{ {
rgbacol = CGColorCreateCopyByMatchingToColorSpace(wxMacGetGenericRGBColorSpace(), kCGRenderingIntentDefault, col, NULL); rgbacol = CGColorCreateCopyByMatchingToColorSpace(wxMacGetGenericRGBColorSpace(), kCGRenderingIntentDefault, col, NULL);
@@ -126,7 +125,6 @@ wxCGColorRefData::wxCGColorRefData(CGColorRef col)
components = CGColorGetComponents(rgbacol); components = CGColorGetComponents(rgbacol);
} }
else else
#endif
{ {
isRGB = false; isRGB = false;
} }

View File

@@ -44,12 +44,6 @@
#define DEBUG_WEBKIT_SIZING 0 #define DEBUG_WEBKIT_SIZING 0
#if defined(MAC_OS_X_VERSION_10_11) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11)
#define wxWEBKIT_PROTOCOL_SINCE_10_11(proto) < proto >
#else
#define wxWEBKIT_PROTOCOL_SINCE_10_11(proto)
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// macros // macros
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -59,7 +53,7 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewWebKit, wxWebView);
wxBEGIN_EVENT_TABLE(wxWebViewWebKit, wxControl) wxBEGIN_EVENT_TABLE(wxWebViewWebKit, wxControl)
wxEND_EVENT_TABLE() wxEND_EVENT_TABLE()
@interface WebViewLoadDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebFrameLoadDelegate) @interface WebViewLoadDelegate : NSObject<WebFrameLoadDelegate>
{ {
wxWebViewWebKit* webKitWindow; wxWebViewWebKit* webKitWindow;
} }
@@ -68,7 +62,7 @@ wxEND_EVENT_TABLE()
@end @end
@interface WebViewPolicyDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebPolicyDelegate) @interface WebViewPolicyDelegate : NSObject<WebPolicyDelegate>
{ {
wxWebViewWebKit* webKitWindow; wxWebViewWebKit* webKitWindow;
} }
@@ -77,7 +71,7 @@ wxEND_EVENT_TABLE()
@end @end
@interface WebViewUIDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebUIDelegate) @interface WebViewUIDelegate : NSObject<WebUIDelegate>
{ {
wxWebViewWebKit* webKitWindow; wxWebViewWebKit* webKitWindow;
} }

View File

@@ -244,11 +244,10 @@ void wxRibbonAUIArtProvider::SetColourScheme(
m_tab_ctrl_background_colour = LikePrimary(0.9); m_tab_ctrl_background_colour = LikePrimary(0.9);
#ifdef __WXMAC__ #ifdef __WXMAC__
if ( wxPlatformInfo::Get().CheckOSVersion(10, 10 ) ) m_tab_ctrl_background_gradient_colour = m_tab_ctrl_background_colour;
m_tab_ctrl_background_gradient_colour = m_tab_ctrl_background_colour; #else
else
#endif
m_tab_ctrl_background_gradient_colour = LikePrimary(1.7); m_tab_ctrl_background_gradient_colour = LikePrimary(1.7);
#endif
m_tab_border_pen = LikePrimary(0.75); m_tab_border_pen = LikePrimary(0.75);
#ifdef __WXMAC__ #ifdef __WXMAC__
m_tab_label_colour = wxSystemSettings::GetColour(wxSYS_COLOUR_CAPTIONTEXT); m_tab_label_colour = wxSystemSettings::GetColour(wxSYS_COLOUR_CAPTIONTEXT);
@@ -259,19 +258,17 @@ void wxRibbonAUIArtProvider::SetColourScheme(
m_tab_hover_label_colour = m_tab_label_colour; m_tab_hover_label_colour = m_tab_label_colour;
m_tab_hover_background_top_colour = primary_hsl.ToRGB(); m_tab_hover_background_top_colour = primary_hsl.ToRGB();
#ifdef __WXMAC__ #ifdef __WXMAC__
if ( wxPlatformInfo::Get().CheckOSVersion(10, 10 ) ) m_tab_hover_background_top_gradient_colour = m_tab_hover_background_top_colour;
m_tab_hover_background_top_gradient_colour = m_tab_hover_background_top_colour; #else
else
#endif
m_tab_hover_background_top_gradient_colour = LikePrimary(1.6); m_tab_hover_background_top_gradient_colour = LikePrimary(1.6);
#endif
m_tab_hover_background_brush = m_tab_hover_background_top_colour; m_tab_hover_background_brush = m_tab_hover_background_top_colour;
m_tab_active_background_colour = m_tab_ctrl_background_gradient_colour; m_tab_active_background_colour = m_tab_ctrl_background_gradient_colour;
#ifdef __WXMAC__ #ifdef __WXMAC__
if ( wxPlatformInfo::Get().CheckOSVersion(10, 10 ) ) m_tab_active_background_gradient_colour = m_tab_active_background_colour;
m_tab_active_background_gradient_colour = m_tab_active_background_colour; #else
else
#endif
m_tab_active_background_gradient_colour = primary_hsl.ToRGB(); m_tab_active_background_gradient_colour = primary_hsl.ToRGB();
#endif
m_tab_active_top_background_brush = m_tab_active_background_colour; m_tab_active_top_background_brush = m_tab_active_background_colour;
m_panel_label_colour = m_tab_label_colour; m_panel_label_colour = m_tab_label_colour;
m_panel_minimised_label_colour = m_panel_label_colour; m_panel_minimised_label_colour = m_panel_label_colour;