Check for FriBiDi version 1 explicitely.

This commit is contained in:
Moritz Göbelbecker 2008-05-15 13:37:40 +00:00
parent 130f897a72
commit d0088db5c7

View File

@ -9,6 +9,8 @@
# also defined, but not for general use are
# FRIBIDI_LIBRARY, where to find the FriBiDi library.
include(CheckFunctionExists)
SET(FRIBIDI_FOUND "NO")
FIND_PATH(FRIBIDI_INCLUDE_DIR fribidi/fribidi.h
@ -23,11 +25,22 @@ FIND_LIBRARY(FRIBIDI_LIBRARY
)
IF (FRIBIDI_LIBRARY AND FRIBIDI_INCLUDE_DIR)
SET(FRIBIDI_LIBRARIES ${FRIBIDI_LIBRARY})
SET(FRIBIDI_FOUND "YES")
SET(CMAKE_REQUIRED_INCLUDES ${FRIBIDI_INCLUDE_DIR})
SET(CMAKE_REQUIRED_LIBRARIES ${FRIBIDI_LIBRARY})
CHECK_FUNCTION_EXISTS(fribidi_utf8_to_unicode FOUND_fribidi_utf8_to_unicode)
message("exists: ${FOUND_fribidi_utf8_to_unicode}" )
if(FOUND_fribidi_utf8_to_unicode)
SET(FRIBIDI_LIBRARIES ${FRIBIDI_LIBRARY})
SET(FRIBIDI_FOUND "YES")
else()
SET(FRIBIDI_LIBRARIES "NOTFOUND")
SET(FRIBIDI_INCLUDE_DIR "NOTFOUND")
SET(FRIBIDI_FOUND "NO")
endif()
ENDIF (FRIBIDI_LIBRARY AND _FRIBIDI_INCLUDE_DIR)
IF (FRIBIDI_FOUND)
IF (NOT FRIBIDI_FIND_QUIETLY)
MESSAGE(STATUS "Found FriBiDi: ${FRIBIDI_LIBRARY}")
ENDIF (NOT FRIBIDI_FIND_QUIETLY)