cmake: Fix regression in FindFriBiDi

Fixes CMake being unable to find FriBiDi here on Debian jessie.

Commit 651344ee1b introduced something
that looks more like post-processing syntax used by MacPorts and doesn't
appear in CMake's documentation. Reverting this commit fixes FriBiDi
detection for me, but the original approach of hardcoding search paths
seems unnecessary as far back as CMake 2.6.0, our minimum supported
version. This is because find_library() and find_path() both use CMake's
configured system prefixes automatically and provide a PATH_SUFFIXES
option with suffixes to use for e.g. locating FriBiDi's include dir
(/usr/include/fribidi here).
This commit is contained in:
Ignacio R. Morelle 2015-04-10 02:53:29 -03:00
parent 5de0bbbf28
commit fb01510726

View file

@ -19,14 +19,13 @@ SET(FRIBIDI_FOUND "NO")
# Set variable in temp var, otherwise FIND_PATH might fail
# unset isn't present in the required version of cmake.
FIND_PATH(xFRIBIDI_INCLUDE_DIR fribidi.h
@PREFIX@/include/fribidi
PATH_SUFFIXES fribidi
)
set(FRIBIDI_INCLUDE_DIR ${xFRIBIDI_INCLUDE_DIR})
SET(FRIBIDI_NAMES ${FRIBIDI_NAMES} fribidi libfribidi)
FIND_LIBRARY(FRIBIDI_LIBRARY
NAMES ${FRIBIDI_NAMES}
PATHS @PREFIX@/lib
)
IF (FRIBIDI_LIBRARY AND FRIBIDI_INCLUDE_DIR)