diff --git a/.github/workflows/ci_mac.yml b/.github/workflows/ci_mac.yml index 9b2ab8e645..b59381e55d 100644 --- a/.github/workflows/ci_mac.yml +++ b/.github/workflows/ci_mac.yml @@ -104,6 +104,14 @@ jobs: skip_samples: true skip_testing: true allow_warnings: true + - name: wxiOS Simulator on Silicon Mac + runner: macos-15 + arch: arm64 + configure_flags: --with-iphonesimulator --enable-monolithic --disable-shared --with-macosx-sdk=$(xcrun --sdk iphonesimulator --show-sdk-path) --host=aarch64-apple-darwin24.6.0 --build=aarch64-apple-darwin --without-libtiff + xcode_sdk: iphonesimulator + skip_samples: true + skip_testing: true + allow_warnings: true env: wxUSE_ASAN: ${{ matrix.use_asan && 1 || 0 }} diff --git a/configure b/configure index 7ad2bbeea5..68914de138 100755 --- a/configure +++ b/configure @@ -1093,6 +1093,7 @@ with_osx_iphone with_osx with_cocoa with_iphone +with_iphonesimulator with_mac with_wine with_msw @@ -2379,6 +2380,7 @@ Optional Packages: --with-osx use macOS (default port, Cocoa) --with-cocoa same as --with-osx_cocoa --with-iphone same as --with-osx_iphone + --with-iphonesimulator same as --with-osx_iphonesimulator --with-mac same as --with-osx --with-wine use Wine --with-msw use MS-Windows @@ -4478,6 +4480,19 @@ fi +# Check whether --with-iphonesimulator was given. +if test "${with_iphonesimulator+set}" = set; then : + withval=$with_iphonesimulator; + if test "$withval" != yes; then + as_fn_error $? "Option --with-iphonesimulator doesn't accept any arguments" "$LINENO" 5 + fi + wxUSE_OSX_IPHONE="$withval" wxUSE_IPHONESIMULATOR="yes" CACHE_OSX_IPHONE=1 TOOLKIT_GIVEN=1 + +fi + + + + # Check whether --with-mac was given. if test "${with_mac+set}" = set; then : withval=$with_mac; @@ -23176,7 +23191,11 @@ fi if test "x$wxUSE_MACOSX_VERSION_MIN" != "x"; then if test "$wxUSE_OSX_IPHONE" = 1; then - MACOSX_VERSION_MIN_OPTS="-miphoneos-version-min=$wxUSE_MACOSX_VERSION_MIN" + if test "$wxUSE_IPHONESIMULATOR" = "yes"; then + MACOSX_VERSION_MIN_OPTS="-miphonesimulator-version-min=$wxUSE_MACOSX_VERSION_MIN" + else + MACOSX_VERSION_MIN_OPTS="-miphoneos-version-min=$wxUSE_MACOSX_VERSION_MIN" + fi else MACOSX_VERSION_MIN_OPTS="-mmacosx-version-min=$wxUSE_MACOSX_VERSION_MIN" fi diff --git a/configure.ac b/configure.ac index edbc6f7da5..720711c847 100644 --- a/configure.ac +++ b/configure.ac @@ -418,6 +418,7 @@ WX_ARG_ONLY_WITH(osx_iphone, [ --with-osx_iphone use iOS], [wxUSE_OSX_ 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(iphone, [ --with-iphone same as --with-osx_iphone], [wxUSE_OSX_IPHONE="$withval" CACHE_OSX_IPHONE=1 TOOLKIT_GIVEN=1]) +WX_ARG_ONLY_WITH(iphonesimulator, [ --with-iphonesimulator same as --with-osx_iphonesimulator], [wxUSE_OSX_IPHONE="$withval" wxUSE_IPHONESIMULATOR="yes" 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(wine, [ --with-wine use Wine], [wxUSE_WINE="$withval" CACHE_WINE=1]) WX_ARG_ONLY_WITH(msw, [ --with-msw use MS-Windows], [wxUSE_MSW="$withval" CACHE_MSW=1 TOOLKIT_GIVEN=1]) @@ -1339,7 +1340,11 @@ fi if test "x$wxUSE_MACOSX_VERSION_MIN" != "x"; then if test "$wxUSE_OSX_IPHONE" = 1; then - MACOSX_VERSION_MIN_OPTS="-miphoneos-version-min=$wxUSE_MACOSX_VERSION_MIN" + if test "$wxUSE_IPHONESIMULATOR" = "yes"; then + MACOSX_VERSION_MIN_OPTS="-miphonesimulator-version-min=$wxUSE_MACOSX_VERSION_MIN" + else + MACOSX_VERSION_MIN_OPTS="-miphoneos-version-min=$wxUSE_MACOSX_VERSION_MIN" + fi else MACOSX_VERSION_MIN_OPTS="-mmacosx-version-min=$wxUSE_MACOSX_VERSION_MIN" fi diff --git a/docs/ios/install.md b/docs/ios/install.md index e1a660c0b2..b7d25216fd 100644 --- a/docs/ios/install.md +++ b/docs/ios/install.md @@ -25,3 +25,11 @@ The library can also be build via configure/make: --enable-macosx_arch=i386 \ --with-macosx-sdk=$(xcrun --sdk iphonesimulator --show-sdk-path) make + +On a recent Silicon Mac in the 3.3 branch you need this configure +to compile for the iPhone simulator: + + ../wxWidgets/configure --with-iphonesimulator --enable-monolithic \ + --disable-shared --with-macosx-sdk=$(xcrun --sdk iphonesimulator --show-sdk-path) \ + --host=$(../wxWidgets/config.guess) --build=aarch64-apple-darwin --without-libtiff + make \ No newline at end of file