Cdroid/cmake/modules/FindFribidi.cmake
2023-09-06 18:29:48 +08:00

30 lines
965 B
CMake
Executable File

find_package(PkgConfig)
pkg_check_modules(PC_FRIBIDI fribidi)
find_path(FRIBIDI_INCLUDE_DIRS
NAMES fribidi.h
HINTS ${PC_FRIBIDI_INCLUDEDIR}
${PC_FRIBIDI_INCLUDE_DIRS}
)
find_library(FRIBIDI_LIBRARIES
NAMES fribidi
HINTS ${PC_FRIBIDI_LIBDIR}
${PC_FRIBIDI_LIBRARY_DIRS}
)
#message("FRIBIDI_LIBRARIES=${FRIBIDI_LIBRARIES} FRIBIDI_INCLUDE_DIRS=${FRIBIDI_INCLUDE_DIRS} PC_FRIBIDI_VERSION=${PC_FRIBIDI_VERSION}")
if(FRIBIDI_INCLUDE_DIRS AND FRIBIDI_LIBRARIES)
set(FRIBIDI_FOUND TRUE)
set(FRIBIDI_LIBRARY ${FRIBIDI_LIBRARIES})
set(FRIBIDI_INCLUDE_DIR ${FRIBIDI_INCLUDE_DIRS})
set(FRIBIDI_VERSION ${PC_FRIBIDI_VERSION})
endif()
include(FindPackageHandleStandardArgs)
#FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fribidi REQUIRED_VARS FRIBIDI_INCLUDE_DIRS FRIBIDI_LIBRARIES
# FOUND_VAR FRIBIDI_FOUND VERSION_VAR FRIBIDI_VERSION)
mark_as_advanced(FRIBIDI_LIBRARIES FRIBIDI_LIBRARY FRIBIDI_INCLUDE_DIRS FRIBIDI_INCLUDE_DIR FRIBIDI_FOUND)