2015-10-03 23:59:44 -04:00
|
|
|
# - Find Freetype
|
|
|
|
# Find the Freetype includes and libraries
|
|
|
|
#
|
|
|
|
# Following variables are provided:
|
|
|
|
# FREETYPE_FOUND
|
|
|
|
# True if Freetype has been found
|
|
|
|
# FREETYPE_INCLUDE_DIRS
|
|
|
|
# The include directories of Freetype
|
|
|
|
# FREETYPE_LIBRARIES
|
|
|
|
# Freetype library list
|
|
|
|
|
2015-10-19 13:59:33 -04:00
|
|
|
if(WIN32)
|
2021-04-27 04:19:17 -04:00
|
|
|
find_path(FREETYPE_INCLUDE_DIRS NAMES freetype/freetype.h PATHS "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/include/freetype2")
|
2019-06-08 22:06:50 -04:00
|
|
|
find_library(FREETYPE_LIBRARY NAMES freetype libfreetype PATHS "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/lib")
|
2015-10-03 23:59:44 -04:00
|
|
|
set(FREETYPE_FOUND 1)
|
2015-10-30 12:29:53 -04:00
|
|
|
set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY})
|
2022-02-12 11:31:14 -05:00
|
|
|
elseif(APPLE OR ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
|
2021-05-19 23:27:18 -04:00
|
|
|
find_path(FREETYPE_INCLUDE_DIRS NAMES ft2build.h PATH_SUFFIXES freetype2 include/freetype2 include)
|
|
|
|
find_library(FREETYPE_LIBRARY NAMES freetype)
|
2015-10-18 19:44:28 -04:00
|
|
|
set(FREETYPE_FOUND 1)
|
2015-10-30 12:29:53 -04:00
|
|
|
set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY})
|
2015-10-03 23:59:44 -04:00
|
|
|
else()
|
2021-05-14 11:45:52 -04:00
|
|
|
pkg_check_modules(FREETYPE freetype2)
|
2015-10-03 23:59:44 -04:00
|
|
|
endif()
|
|
|
|
|