mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-12 10:53:09 +00:00
956af1981d
svn path=/trunk/KDE/kdegraphics/cmake/modules/; revision=534250
45 lines
1.2 KiB
CMake
45 lines
1.2 KiB
CMake
# - Try to find FreeType2
|
|
# Once done this will define:
|
|
# FreeType2_FOUND - system has FreeType2
|
|
# FreeType2_INCLUDE_DIR - incude paths to use FreeType2
|
|
# FreeType2_LIBRARIES - Link these to use FreeType2
|
|
#
|
|
# TODO: This script should use the program
|
|
#
|
|
|
|
IF(UNIX)
|
|
FIND_PATH(FreeType2_INCLUDE_DIR
|
|
freetype/config/ftheader.h
|
|
/usr/include/freetype2
|
|
)
|
|
|
|
FIND_LIBRARY(FreeType2_LIBRARIES
|
|
freetype
|
|
/usr/X11R6/lib
|
|
/usr/local/lib
|
|
/usr/openwin/lib
|
|
/usr/lib
|
|
)
|
|
ENDIF(UNIX)
|
|
|
|
if (FreeType2_INCLUDE_DIR AND FreeType2_LIBRARIES)
|
|
set(FreeType2_FOUND TRUE)
|
|
else (FreeType2_INCLUDE_DIR AND FreeType2_LIBRARIES)
|
|
set(FreeType2_FOUND FALSE)
|
|
endif (FreeType2_INCLUDE_DIR AND FreeType2_LIBRARIES)
|
|
|
|
if (FreeType2_FOUND)
|
|
if (NOT FreeType2_FIND_QUIETLY)
|
|
message(STATUS "Found FreeType2: library: ${FreeType2_LIBRARIES}, include path: ${FreeType2_INCLUDE_DIR}")
|
|
endif (NOT FreeType2_FIND_QUIETLY)
|
|
else (FreeType2_FOUND)
|
|
if (FreeType2_FIND_REQUIRED)
|
|
MESSAGE(FATAL_ERROR "Could not find the FreeType2 library and header files.")
|
|
ENDIF (FreeType2_FIND_REQUIRED)
|
|
endif (FreeType2_FOUND)
|
|
|
|
MARK_AS_ADVANCED(
|
|
FreeType2_INCLUDE_DIR
|
|
FreeType2_LIBRARIES
|
|
)
|