#------------------------------------------------------------------- # This file is part of the CMake build system for SCOL # # The contents of this file are placed in the public domain. Feel # free to make use of it in any way you like. #------------------------------------------------------------------- # - Try to find harfbuzz # Once done, this will define # # HARFBUZZ_FOUND - system has Harfbuzz # HARFBUZZ_INCLUDE_DIRS - the Harfbuzz include directories # HARFBUZZ_LIBRARIES - link these to use Harfbuzz include(FindPkgMacros) findpkg_begin(HARFBUZZ) # Get path, convert backslashes as ${ENV_${var}} #getenv_path(HARFBUZZ_HOME) # construct search paths #set(HARFBUZZ_PREFIX_PATH ${HARFBUZZ_HOME} ${ENV_HARFBUZZ_HOME}) create_search_paths(HARFBUZZ) # redo search if prefix path changed clear_if_changed(HARFBUZZ_PREFIX_PATH HARFBUZZ_LIBRARY_FWK HARFBUZZ_LIBRARY_REL HARFBUZZ_LIBRARY_DBG HARFBUZZ_INCLUDE_DIR ) set(HARFBUZZ_LIBRARY_NAMES harfbuzz) get_debug_names(HARFBUZZ_LIBRARY_NAMES) #use_pkgconfig(HARFBUZZ_PKGC harfbuzz) # prefer static library over framework set(CMAKE_FIND_FRAMEWORK "LAST") message(STATUS "CMAKE_TOOLCHAIN_FILE: ${CMAKE_TOOLCHAIN_FILE}") findpkg_framework(HARFBUZZ) find_path(HARFBUZZ_INCLUDE_DIR NAMES hb.h HINTS ${HARFBUZZ_INC_SEARCH_PATH} ${HARFBUZZ_PKGC_INCLUDE_DIRS} PATH_SUFFIXES harfbuzz NO_CMAKE_FIND_ROOT_PATH) find_library(HARFBUZZ_LIBRARY_REL NAMES ${HARFBUZZ_LIBRARY_NAMES} HINTS ${HARFBUZZ_LIB_SEARCH_PATH} ${HARFBUZZ_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel ${ANDROID_ABI} NO_CMAKE_FIND_ROOT_PATH) find_library(HARFBUZZ_LIBRARY_DBG NAMES ${HARFBUZZ_LIBRARY_NAMES_DBG} HINTS ${HARFBUZZ_LIB_SEARCH_PATH} ${HARFBUZZ_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug ${ANDROID_ABI} NO_CMAKE_FIND_ROOT_PATH) make_library_set(HARFBUZZ_LIBRARY) findpkg_finish(HARFBUZZ) # Reset framework finding set(CMAKE_FIND_FRAMEWORK "FIRST")