diff options
author | Alexander Neundorf <neundorf@kde.org> | 2006-01-28 15:32:00 +0000 |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2006-01-28 15:32:00 +0000 |
commit | 06c252e787a30b58f650c61854d5d870cd2dfb4f (patch) | |
tree | c59a9638f353bcde513f0be05919575728188d62 /modules/FindAGG.cmake | |
parent | bfe61edb969f42e1f9faa39baa3e6d33c77c92d9 (diff) | |
download | extra-cmake-modules-06c252e787a30b58f650c61854d5d870cd2dfb4f.tar.gz extra-cmake-modules-06c252e787a30b58f650c61854d5d870cd2dfb4f.tar.bz2 |
-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
Diffstat (limited to 'modules/FindAGG.cmake')
-rw-r--r-- | modules/FindAGG.cmake | 45 |
1 files changed, 45 insertions, 0 deletions
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) + |