summaryrefslogtreecommitdiff
path: root/CMake/variables.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/variables.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/variables.cmake')
-rw-r--r--CMake/variables.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMake/variables.cmake b/CMake/variables.cmake
index 3d37aecad..981cd077c 100644
--- a/CMake/variables.cmake
+++ b/CMake/variables.cmake
@@ -44,6 +44,11 @@ if(WIN32)
list(APPEND FLTK_LDLIBS -lole32 -luuid -lcomctl32 -lws2_32)
elseif(APPLE AND NOT FLTK_BACKEND_X11)
list(APPEND FLTK_LDLIBS "-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"))
+ list(APPEND FLTK_LDLIBS "-framework UniformTypeIdentifiers")
+ endif()
+ endif()
elseif(FLTK_BACKEND_WAYLAND)
list(APPEND FLTK_LDLIBS "-lwayland-cursor -lwayland-client -lxkbcommon -ldbus-1")
if(USE_SYSTEM_LIBDECOR)