From 06c252e787a30b58f650c61854d5d870cd2dfb4f Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 28 Jan 2006 15:32:00 +0000 Subject: -new module to find agg (I don't have it installed here, so I couldn't really test it) -some cosmetic changes -FindQt4 should now also work if only the debug libraries are present, less LOC -preparation for windows developers Alex svn path=/trunk/KDE/kdelibs/; revision=503263 --- modules/FindAGG.cmake | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 modules/FindAGG.cmake (limited to 'modules/FindAGG.cmake') diff --git a/modules/FindAGG.cmake b/modules/FindAGG.cmake new file mode 100644 index 00000000..6dc61dfe --- /dev/null +++ b/modules/FindAGG.cmake @@ -0,0 +1,45 @@ +# - Try to find AGG +# Once done this will define +# +# AGG_FOUND - system has AGG +# AGG_INCLUDE_DIR - the AGG include directory +# AGG_LIBRARY - Link these to use OpenGL and GLU +# AGG_DEFINITIONS - Compiler switches required for using AGG +# + + +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +INCLUDE(UsePkgConfig) + +PKGCONFIG(libagg _AGGIncDir _AGGLinkDir _AGGLinkFlags _AGGCflags) + +SET(AGG_DEFINITIONS ${_AGGCflags}) + +FIND_PATH(AGG_INCLUDE_DIR agg2/agg_conv_stroke.h + ${_AGGIncDir} + /usr/include + /usr/local/include +) + +FIND_LIBRARY(AGG_LIBRARY NAMES agg + PATHS + ${_AGGLinkDir} + /usr/lib + /usr/local/lib +) + +IF(AGG_INCLUDE_DIR AND AGG_LIBRARY) + SET(AGG_FOUND TRUE) +ENDIF(AGG_INCLUDE_DIR AND AGG_LIBRARY) + +IF(AGG_FOUND) + IF(NOT AGG_FIND_QUIETLY) + MESSAGE(STATUS "Found AGG: ${AGG_LIBRARY}") + ENDIF(NOT AGG_FIND_QUIETLY) +ELSE(AGG_FOUND) + IF(AGG_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find AGG") + ENDIF(AGG_FIND_REQUIRED) +ENDIF(AGG_FOUND) + -- cgit v1.2.1