From 70b84b491b889ecb528e46aae20b6105e0b96065 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Fri, 3 May 2024 15:23:42 +0200 Subject: macOS + CMake: fix use of optional framework UniformTypeIdentifiers --- src/Fl_Native_File_Chooser_MAC.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Fl_Native_File_Chooser_MAC.mm b/src/Fl_Native_File_Chooser_MAC.mm index a10aa6c9d..2317de9c0 100644 --- a/src/Fl_Native_File_Chooser_MAC.mm +++ b/src/Fl_Native_File_Chooser_MAC.mm @@ -532,7 +532,8 @@ static char *prepareMacFilter(int count, const char *filter, char **patterns) { - (void)control_allowed_types:(const char *)p { NSString *ext = [NSString stringWithUTF8String:p]; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_11_0 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_11_0 && \ + MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_11_0 if (fl_mac_os_version >= 110000) { UTType *type = [UTType typeWithFilenameExtension:ext]; // 11.0 + framework UniformTypeIdentifiers [dialog setAllowedContentTypes:[NSArray arrayWithObject:type]]; // 11.0 -- cgit v1.2.3