CMake: put freetype stuff in include directories for X11 only

This would create these warnings for each source file compiled
  osxcross: warning: possibly dangerous include path specified: '-I /usr/include/freetype2'
  osxcross: info: you can silence this warning via 'OSXCROSS_NO_INCLUDE_PATH_WARNINGS=1' (env)
when cross-compiling from Linux to macOS.
This commit is contained in:
ManoloFLTK 2024-05-02 19:43:54 +02:00
parent 24c1472c06
commit 4a31d4988b
1 changed files with 2 additions and 2 deletions

View File

@ -137,9 +137,9 @@ endif(NOT HAVE_DIRENT_H)
find_path(FREETYPE_PATH freetype.h PATH_SUFFIXES freetype2)
find_path(FREETYPE_PATH freetype/freetype.h PATH_SUFFIXES freetype2)
if(FREETYPE_PATH)
if(FREETYPE_PATH AND FLTK_BACKEND_X11)
list(APPEND FLTK_BUILD_INCLUDE_DIRECTORIES ${FREETYPE_PATH})
endif(FREETYPE_PATH)
endif(FREETYPE_PATH AND FLTK_BACKEND_X11)
mark_as_advanced(FREETYPE_PATH)