CMake/macOS/X11: fix "FINK" search directories

note: use only if found.

Todo: check if we can get rid of explicit directory names like /opt/sw,
  /sw, /opt/X11, ...
This commit is contained in:
Albrecht Schlosser 2024-02-24 19:20:22 +01:00
parent 37c8c051ba
commit 77c726c79c

View File

@ -879,9 +879,11 @@ if((X11_Xft_FOUND OR NOT USE_PANGOXFT) AND FLTK_USE_PANGO)
# this covers Debian, Ubuntu, FreeBSD, NetBSD, Darwin
if(APPLE AND FLTK_BACKEND_X11)
find_file(FINK_PREFIX NAMES /opt/sw /sw)
list(APPEND CMAKE_INCLUDE_PATH ${FINK_PREFIX}/include)
list(APPEND FLTK_BUILD_INCLUDE_DIRECTORIES ${FINK_PREFIX}/include/cairo)
list(APPEND CMAKE_LIBRARY_PATH ${FINK_PREFIX}/lib)
if(FINK_PREFIX)
list(APPEND CMAKE_INCLUDE_PATH ${FINK_PREFIX}/include)
list(APPEND FLTK_BUILD_INCLUDE_DIRECTORIES ${FINK_PREFIX}/include/cairo)
list(APPEND CMAKE_LIBRARY_PATH ${FINK_PREFIX}/lib)
endif(FINK_PREFIX)
endif(APPLE AND FLTK_BACKEND_X11)
find_file(HAVE_PANGO_H pango-1.0/pango/pango.h ${CMAKE_INCLUDE_PATH})