diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-03-23 17:16:57 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-03-23 17:16:57 +0100 |
| commit | 97d2836f5e72054f640289a93c4f2dd776c4fd00 (patch) | |
| tree | 84f60fb06ef7a03103cf2a1499c5602df88e9655 /CMake/fl_add_library.cmake | |
| parent | f3640a7312413ef8afc2db1060137a04eea2a016 (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/fl_add_library.cmake')
| -rw-r--r-- | CMake/fl_add_library.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMake/fl_add_library.cmake b/CMake/fl_add_library.cmake index d33b4d8ba..3f57e7a3d 100644 --- a/CMake/fl_add_library.cmake +++ b/CMake/fl_add_library.cmake @@ -154,6 +154,11 @@ function(fl_add_library LIBNAME LIBTYPE SOURCES) if(APPLE AND NOT FLTK_BACKEND_X11) target_link_libraries(${TARGET_NAME} PUBLIC "-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")) + target_link_libraries(${TARGET_NAME} PUBLIC "-framework UniformTypeIdentifiers") + endif() + endif() endif() # we must link fltk with cairo if Cairo or Wayland is enabled (or both) |
