fysxasteroids/engine/CMake/FindFreeType2.cmake

29 lines
1021 B
CMake

# Tries to find FREETYPE2 (http://freetype2.bespin.org) a simple and fast
# network library by Lee Salzman
#
SET (FREETYPE2_FOUND FALSE)
FIND_PATH (FREETYPE2_INCLUDE_DIR freetype/freetype.h /usr/include/ /usr/local/include/ /usr/include/freetype2 /usr/local/include/freetype2 $ENV{FREETYPE2_PATH}/include $ENV{FREETYPE2_INCLUDE_PATH})
FIND_LIBRARY (FREETYPE2_LIBRARIES NAMES freetype PATHS /usr/lib /usr/local/lib $ENV{FREETYPE2_PATH} $ENV{FREETYPE2_PATH}/lib ENV{FREETYPE2_LIBRARY_PATH})
IF (FREETYPE2_INCLUDE_DIR AND FREETYPE2_LIBRARIES)
SET (FREETYPE2_FOUND TRUE)
ENDIF (FREETYPE2_INCLUDE_DIR AND FREETYPE2_LIBRARIES)
IF (FREETYPE2_FOUND)
IF (NOT FREETYPE2_FIND_QUIETLY)
MESSAGE(STATUS "Found FREETYPE2: ${FREETYPE2_LIBRARIES}")
ENDIF (NOT FREETYPE2_FIND_QUIETLY)
ELSE (FREETYPE2_FOUND)
IF (FREETYPE2_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find FREETYPE2")
ENDIF (FREETYPE2_FIND_REQUIRED)
ENDIF (FREETYPE2_FOUND)
MARK_AS_ADVANCED (
FREETYPE2_INCLUDE_DIR
FREETYPE2_LIBRARIES
)