On Friday, February 19, 2021 at 11:07:17 AM UTC+1 Albrecht Schlosser wrote:
On 2/19/21 10:02 AM Manolo wrote:
>
> Under macOS, CMake-based build with OPTION_USE_PANGO (and
> OPTION_APPLE_X11) turned on fails because variables such as
> HAVE_LIB_PANGO and HAVE_LIB_PANGOCAIRO remain undefined.
> That results from recent changes in CMake-related files.
Can you tell me which exact changes? Commits (hashes)?
I believe to understand what happened. It's not caused by any commit.
Previously, CMake command pkg_check_modules() would not work
on my setting (macOS + Fink) where pkg-config is in /opt/sw/bin
because CMake, run from the finder, does not search this folder.
The backup part of options.cmake was therefore used to locate Pango:
if (APPLE AND OPTION_APPLE_X11)
find_file(FINK_PREFIX NAMES /opt/sw /sw)
list (APPEND CMAKE_INCLUDE_PATH ${FINK_PREFIX}/include)
include_directories (${FINK_PREFIX}/include/cairo)
list (APPEND CMAKE_LIBRARY_PATH ${FINK_PREFIX}/lib)
endif (APPLE AND OPTION_APPLE_X11)
…
find_library(HAVE_LIB_PANGO pango-1.0 ${CMAKE_LIBRARY_PATH})
Yesterday I added to /usr/local/bin a link to /opt/sw/bin/pkg-config .
CMake started to perform successfully command
pkg_check_modules(PANGOXFT pangoxft)
but that other command
find_library(HAVE_LIB_PANGO pango-1.0 ${CMAKE_LIBRARY_PATH})
would fail, for a reason I believe to be that CMAKE_LIBRARY_PATH is not
the place to search for the Pango library in the macOS + Fink setup.
Therefore, my proposal to modify that command as follows
find_library(HAVE_LIB_PANGO pango-1.0 ${CMAKE_LIBRARY_PATH} ${PANGOXFT_LIBRARY_DIRS})
I also wonder whether command
find_library(HAVE_LIB_PANGO pango-1.0 ${PANGOXFT_LIBRARY_DIRS})
is not the good one, just after
pkg_check_modules(PANGOXFT pangoxft)