summaryrefslogtreecommitdiff
path: root/CMake/setup.cmake
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-03-23 17:16:57 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-03-23 17:16:57 +0100
commit97d2836f5e72054f640289a93c4f2dd776c4fd00 (patch)
tree84f60fb06ef7a03103cf2a1499c5602df88e9655 /CMake/setup.cmake
parentf3640a7312413ef8afc2db1060137a04eea2a016 (diff)
macOS: remove deprecated use of property allowedFileTypes in class NSSavePanel
The recommended replacement requires macos ≥ 11.0 and a new framework: UniformTypeIdentifiers
Diffstat (limited to 'CMake/setup.cmake')
-rw-r--r--CMake/setup.cmake6
1 files changed, 6 insertions, 0 deletions
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)