2012-03-05 20:07:26 -05:00
|
|
|
# - Find Fribidi
|
|
|
|
# Find the Fribidi includes and libraries
|
|
|
|
#
|
|
|
|
# Following variables are provided:
|
|
|
|
# FRIBIDI_FOUND
|
|
|
|
# True if Fribidi has been found
|
|
|
|
# FRIBIDI_INCLUDE_DIRS
|
|
|
|
# The include directories of Fribidi
|
|
|
|
# FRIBIDI_LIBRARIES
|
|
|
|
# Fribidi library list
|
|
|
|
|
2018-06-15 15:06:29 -04:00
|
|
|
if(UNIX AND NOT APPLE)
|
2013-03-13 00:03:26 -04:00
|
|
|
include(FindPkgConfig)
|
|
|
|
pkg_check_modules(FRIBIDI fribidi)
|
2012-12-12 21:23:14 -05:00
|
|
|
else()
|
2013-03-13 00:03:26 -04:00
|
|
|
set(FRIBIDI_FOUND 0)
|
2012-12-12 21:23:14 -05:00
|
|
|
endif()
|
2012-03-05 20:07:26 -05:00
|
|
|
|
2012-12-12 21:23:14 -05:00
|
|
|
if(NOT FRIBIDI_FOUND)
|
2017-04-06 09:59:01 -04:00
|
|
|
find_path(FRIBIDI_INCLUDE_DIR NAMES fribidi/fribidi.h PATHS /Library/Frameworks/fribidi.framework/Headers "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/include")
|
|
|
|
find_library(FRIBIDI_LIBRARY NAMES fribidi PATHS /Library/Frameworks/fribidi.framework "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/lib")
|
2012-03-05 20:07:26 -05:00
|
|
|
|
2013-03-13 00:03:26 -04:00
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(Fribidi DEFAULT_MSG FRIBIDI_INCLUDE_DIR FRIBIDI_LIBRARY)
|
2012-03-05 20:07:26 -05:00
|
|
|
|
2013-03-13 00:03:26 -04:00
|
|
|
if(APPLE)
|
|
|
|
set(FRIBIDI_INCLUDE_DIR "/Library/Frameworks/fribidi.framework/Headers")
|
|
|
|
endif()
|
2012-03-05 20:07:26 -05:00
|
|
|
|
2013-03-13 00:03:26 -04:00
|
|
|
# Publish variables
|
|
|
|
set(FRIBIDI_INCLUDE_DIRS ${FRIBIDI_INCLUDE_DIR})
|
|
|
|
set(FRIBIDI_LIBRARIES ${FRIBIDI_LIBRARY})
|
2012-03-05 20:15:27 -05:00
|
|
|
endif()
|
2012-03-05 20:07:26 -05:00
|
|
|
|
|
|
|
mark_as_advanced(FRIBIDI_INCLUDE_DIR FRIBIDI_LIBRARY)
|