diff --git a/kiwixbuild/platforms/ios.py b/kiwixbuild/platforms/ios.py index 065a62c..69cd54d 100644 --- a/kiwixbuild/platforms/ios.py +++ b/kiwixbuild/platforms/ios.py @@ -5,6 +5,8 @@ from kiwixbuild.utils import pj, xrun_find from .base import PlatformInfo, MetaPlatformInfo, MixedMixin +MIN_MACOS_VERSION = '12.0' + class ApplePlatformInfo(PlatformInfo): build = 'iOS' static = True @@ -144,7 +146,7 @@ class macOSArm64(ApplePlatformInfo): target = 'arm64-apple-macos' sdk_name = 'macosx' min_iphoneos_version = None - min_macos_version = '12.0' + min_macos_version = MIN_MACOS_VERSION class macOSArm64Mixed(MixedMixin('macOS_arm64_static'), ApplePlatformInfo): @@ -154,7 +156,7 @@ class macOSArm64Mixed(MixedMixin('macOS_arm64_static'), ApplePlatformInfo): target = 'arm64-apple-macos' sdk_name = 'macosx' min_iphoneos_version = None - min_macos_version = '12.0' + min_macos_version = MIN_MACOS_VERSION class macOSx64(ApplePlatformInfo): @@ -164,7 +166,7 @@ class macOSx64(ApplePlatformInfo): target = 'x86_64-apple-macos' sdk_name = 'macosx' min_iphoneos_version = None - min_macos_version = '12.0' + min_macos_version = MIN_MACOS_VERSION class IOS(MetaPlatformInfo): diff --git a/kiwixbuild/platforms/native.py b/kiwixbuild/platforms/native.py index 8e10401..94005a6 100644 --- a/kiwixbuild/platforms/native.py +++ b/kiwixbuild/platforms/native.py @@ -2,7 +2,7 @@ from .base import PlatformInfo, MixedMixin from kiwixbuild.utils import pj from kiwixbuild._global import option, neutralEnv - +from kiwixbuild.platforms.ios import MIN_MACOS_VERSION class NativePlatformInfo(PlatformInfo): build = 'native' @@ -11,6 +11,8 @@ class NativePlatformInfo(PlatformInfo): env = super().get_env() if neutralEnv('distname') == 'fedora': env['QT_SELECT'] = "5-64" + if neutralEnv('distname') == 'Darwin': + env['CFLAGS'] += ' '.join([env['CFLAGS'], f'-mmacosx-version-min={MIN_MACOS_VERSION}']) return env