Warning, /frameworks/kdelibs4support/cmake/modules/FindAGG.cmake is written in an unsupported language. File is not indexed.

0001 # - Try to find the AGG graphics library
0002 # Once done this will define
0003 #
0004 #  AGG_FOUND - system has AGG
0005 #  AGG_INCLUDE_DIR - the AGG include directory
0006 #  AGG_LIBRARIES - Link these to use AGG
0007 #  AGG_DEFINITIONS - Compiler switches required for using AGG
0008 
0009 # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
0010 #
0011 # Redistribution and use is allowed according to the terms of the BSD license.
0012 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
0013 
0014 if (AGG_INCLUDE_DIR AND AGG_LIBRARIES)
0015 
0016   # in cache already
0017   set(AGG_FOUND TRUE)
0018 
0019 else (AGG_INCLUDE_DIR AND AGG_LIBRARIES)
0020   if (NOT WIN32)
0021     # use pkg-config to get the directories and then use these values
0022     # in the FIND_PATH() and FIND_LIBRARY() calls
0023     find_package(PkgConfig)
0024     pkg_check_modules(PC_AGG QUIET libagg) 
0025 
0026     set(AGG_DEFINITIONS ${PC_AGG_CFLAGS_OTHER})
0027   endif (NOT WIN32)
0028 
0029   find_path(AGG_INCLUDE_DIR agg2/agg_pixfmt_gray.h
0030     PATHS ${PC_AGG_INCLUDEDIR} ${PC_AGG_INCLUDE_DIRS}
0031   )
0032   
0033   find_library(AGG_LIBRARIES NAMES agg
0034     PATHS ${PC_AGG_LIBDIR} ${PC_AGG_LIBRARY_DIRS}
0035   )
0036   
0037   if (AGG_INCLUDE_DIR AND AGG_LIBRARIES)
0038      set(AGG_FOUND TRUE)
0039   endif (AGG_INCLUDE_DIR AND AGG_LIBRARIES)
0040   
0041   if (AGG_FOUND)
0042     if (NOT AGG_FIND_QUIETLY)
0043       message(STATUS "Found AGG: ${AGG_LIBRARIES}")
0044     endif (NOT AGG_FIND_QUIETLY)
0045   else (AGG_FOUND)
0046     if (AGG_FIND_REQUIRED)
0047       message(FATAL_ERROR "Could NOT find AGG")
0048     endif (AGG_FIND_REQUIRED)
0049   endif (AGG_FOUND)
0050   
0051   mark_as_advanced(AGG_INCLUDE_DIR AGG_LIBRARIES)
0052   
0053 endif (AGG_INCLUDE_DIR AND AGG_LIBRARIES)