-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFindFreeType2.cmake
More file actions
21 lines (20 loc) · 974 Bytes
/
Copy pathFindFreeType2.cmake
File metadata and controls
21 lines (20 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Try to find FreeType2
# Released under MIT License by Kota Weaver
# Once done this will define
# FREETYPE2_FOUND - System has FreeType2
# FREETYPE2_INCLUDE_DIRS - The FreeType2 include directories
# FREETYPE2_LIBRARIES - The libraries needed to use FreeType2
# FREETYPE2_DEFINITIONS - Compiler switches required for using FreeType2
find_package(PkgConfig)
pkg_check_modules(PC_FREETYPE2 QUIET freetype2)
set(FREETYPE2_DEFINITIONS ${PC_FREETYPE2_CFLAGS_OTHER})
find_path(FREETYPE2_INCLUDE_DIR ft2build.h
HINTS ${PC_FREETYPE2_INCLUDEDIR} ${PC_FREETYPE2_INCLUDE_DIRS})
find_library(FREETYPE2_LIBRARY NAMES freetype
HINTS ${PC_FREETYPE2_LIBDIR} ${FREETYPE2_LIBRARY_DIRS})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(FREETYPE2 DEFAULT_MSG
FREETYPE2_LIBRARY FREETYPE2_INCLUDE_DIR)
mark_as_advanced(FREETYPE2_LIBRARY FREETYPE2_INCLUDE_DIR)
set(FREETYPE2_LIBRARIES ${FREETYPE2_LIBRARY})
set(FREETYPE2_INCLUDE_DIRS ${FREETYPE2_INCLUDE_DIR})