Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion cmake/modules/SearchInstalledSoftware.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,15 @@ endif()
if(cocoa)
if(APPLE)
set(x11 OFF CACHE BOOL "Disabled because cocoa requested (${x11_description})" FORCE)
set(builtin_freetype ON CACHE BOOL "Enabled because needed for Cocoa graphics (${builtin_freetype_description})" FORCE)
# We allow using an external FreeType library
if(NOT builtin_freetype)
find_package(Freetype)
if(NOT FREETYPE_FOUND)
# FreeType is needed on MacOS, fallback to enabling builtin if it was not found
message(STATUS "FreeType not found. Switching on builtin_freetype option")
set(builtin_freetype ON CACHE BOOL "Enabled because needed for Cocoa graphics (${builtin_freetype_description})" FORCE)
endif()
endif()
else()
message(STATUS "Cocoa option can only be enabled on MacOSX platform")
set(cocoa OFF CACHE BOOL "Disabled because only available on MacOSX (${cocoa_description})" FORCE)
Expand Down
Loading