From 97d2836f5e72054f640289a93c4f2dd776c4fd00 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sat, 23 Mar 2024 17:16:57 +0100 Subject: macOS: remove deprecated use of property allowedFileTypes in class NSSavePanel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The recommended replacement requires macos ≥ 11.0 and a new framework: UniformTypeIdentifiers --- CMake/setup.cmake | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CMake/setup.cmake') diff --git a/CMake/setup.cmake b/CMake/setup.cmake index b663813be..69835fcb8 100644 --- a/CMake/setup.cmake +++ b/CMake/setup.cmake @@ -126,6 +126,12 @@ if(APPLE) else() set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework Cocoa") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -framework Cocoa") + if(NOT(${CMAKE_SYSTEM_VERSION} VERSION_LESS 20.0.0)) # a.k.a. macOS version ≥ 11.0 + if (NOT (CMAKE_OSX_ARCHITECTURES STREQUAL "ppc" OR CMAKE_OSX_ARCHITECTURES STREQUAL "i386")) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework UniformTypeIdentifiers") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -framework UniformTypeIdentifiers") + endif() + endif() endif(FLTK_BACKEND_X11) endif(APPLE) -- cgit v1.2.3