diff options
| author | Laurent Montel <montel@kde.org> | 2007-04-23 16:53:13 +0000 | 
|---|---|---|
| committer | Laurent Montel <montel@kde.org> | 2007-04-23 16:53:13 +0000 | 
| commit | 2cb05ed201dc81563a82e7b3888d4f9d6624229e (patch) | |
| tree | bc12752c116fc17a955fe0e87cb99873415c56c5 | |
| parent | 05e931b9d6e04948bede04cfabea8d6982b306c6 (diff) | |
| download | extra-cmake-modules-2cb05ed201dc81563a82e7b3888d4f9d6624229e.tar.gz extra-cmake-modules-2cb05ed201dc81563a82e7b3888d4f9d6624229e.tar.bz2  | |
Use by koffice/kdegraphics
svn path=/trunk/KDE/kdelibs/; revision=657255
| -rw-r--r-- | modules/FindPopplerQt4.cmake | 55 | 
1 files changed, 55 insertions, 0 deletions
diff --git a/modules/FindPopplerQt4.cmake b/modules/FindPopplerQt4.cmake new file mode 100644 index 00000000..a67bde44 --- /dev/null +++ b/modules/FindPopplerQt4.cmake @@ -0,0 +1,55 @@ +# - Try to find the Qt4 binding of the Poppler library +# Once done this will define +# +#  POPPLER_QT4_FOUND - system has poppler-qt4 +#  POPPLER_QT4_INCLUDE_DIR - the poppler-qt4 include directory +#  POPPLER_QT4_LIBRARIES - Link these to use poppler-qt4 +#  POPPLER_QT4_DEFINITIONS - Compiler switches required for using poppler-qt4 +# + +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls + +# Copyright (c) 2006, Wilfried Huss, <wilfried.huss@gmx.at> +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if(NOT WIN32) +INCLUDE(UsePkgConfig) +   +PKGCONFIG(poppler-qt4 _PopplerQt4IncDir _PopplerQt4LinkDir _PopplerQt4LinkFlags _PopplerQt4Cflags) +   +set(POPPLER_QT4_DEFINITIONS ${_PopplerQt4Cflags}) +endif(NOT WIN32) + +FIND_PATH(POPPLER_QT4_INCLUDE_DIR poppler-qt4.h +  ${_PopplerQt4IncDir}/poppler +  /usr/include/poppler +  /usr/local/include/poppler +)  +  +FIND_LIBRARY(POPPLER_QT4_LIBRARIES poppler-qt4 +  ${_PopplerQt4LinkDir} +  /usr/lib +  /usr/local/lib +) +   +if (POPPLER_QT4_INCLUDE_DIR AND POPPLER_QT4_LIBRARIES) +  set(POPPLER_QT4_FOUND TRUE) +else (POPPLER_QT4_INCLUDE_DIR AND POPPLER_QT4_LIBRARIES) +  set(POPPLER_QT4_FOUND FALSE) +endif (POPPLER_QT4_INCLUDE_DIR AND POPPLER_QT4_LIBRARIES) +   +if (POPPLER_QT4_FOUND) +  if (NOT PopplerQt4_FIND_QUIETLY) +    message(STATUS "Found poppler-qt4: library: ${POPPLER_QT4_LIBRARIES}, include path: ${POPPLER_QT4_INCLUDE_DIR}") +  endif (NOT PopplerQt4_FIND_QUIETLY) +else (POPPLER_QT4_FOUND) +  if (PopplerQt4_FIND_REQUIRED) +    message(FATAL_ERROR "Could NOT find poppler-qt4") +  endif (PopplerQt4_FIND_REQUIRED) +endif (POPPLER_QT4_FOUND) +   +MARK_AS_ADVANCED(POPPLER_QT4_INCLUDE_DIR POPPLER_QT4_LIBRARIES)  | 
