make the DVI plugin compile with cmake

svn path=/trunk/KDE/kdegraphics/cmake/modules/; revision=534250
This commit is contained in:
Stefan Kebekus 2006-04-26 18:00:36 +00:00
parent 622cea4f92
commit 956af1981d

View file

@ -0,0 +1,44 @@
# - 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
)