Skip to content

Commit

Permalink
MacOS: Rename flag to NFD_USE_ALLOWEDCONTENTTYPES_IF_AVAILABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
btzy committed Aug 7, 2022
1 parent 89a67f8 commit f397884
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if(nfd_PLATFORM STREQUAL PLATFORM_MACOS)
# Set this option to OFF to always use allowedFileTypes regardless of the target macOS version.
# This is mainly needed for applications that are built on macOS >= 11.0 but should be able to run on lower versions
# and should not be used otherwise.
option(NFD_USE_ALLOWEDCONTENTTYPES "Use allowedContentTypes for filter lists on macOS >= 11.0" ON)
option(NFD_USE_ALLOWEDCONTENTTYPES_IF_AVAILABLE "Use allowedContentTypes for filter lists on macOS >= 11.0" ON)

find_library(APPKIT_LIBRARY AppKit)
find_library(UNIFORMTYPEIDENTIFIERS_LIBRARY UniformTypeIdentifiers)
Expand Down Expand Up @@ -68,7 +68,7 @@ if(nfd_PLATFORM STREQUAL PLATFORM_LINUX)
endif()

if(nfd_PLATFORM STREQUAL PLATFORM_MACOS)
if(NFD_USE_ALLOWEDCONTENTTYPES AND UNIFORMTYPEIDENTIFIERS_LIBRARY)
if(NFD_USE_ALLOWEDCONTENTTYPES_IF_AVAILABLE AND UNIFORMTYPEIDENTIFIERS_LIBRARY)
target_link_libraries(${TARGET_NAME} PRIVATE ${APPKIT_LIBRARY} ${UNIFORMTYPEIDENTIFIERS_LIBRARY})
else()
target_link_libraries(${TARGET_NAME} PRIVATE ${APPKIT_LIBRARY})
Expand Down

0 comments on commit f397884

Please sign in to comment.