finding poppler under windows

svn path=/trunk/KDE/kdegraphics/cmake/modules/; revision=737148
This commit is contained in:
Patrick Spendrin 2007-11-15 16:53:15 +00:00
parent f1fa4254f3
commit 3fa4b86d6b

View file

@ -33,10 +33,22 @@ if(_PopplerLinkFlags)
if(_return_VALUE STREQUAL "0")
set(POPPLER_FOUND TRUE)
endif(_return_VALUE STREQUAL "0")
else(_PopplerLinkFlags)
# try to find poppler without pkgconfig
find_library( LIBPOPPLER poppler )
find_library( LIBPOPPLER_QT4 poppler-qt4 )
find_path( INCLUDEPOPPLERQT4 qt4/poppler-qt4.h )
find_path( INCLUDEPOPPLER poppler-qt4.h PATHS ${INCLUDEPOPPLERQT4}/qt4 )
if( LIBPOPPLER_QT4 AND LIBPOPPLER AND INCLUDEPOPPLER )
set( POPPLER_FOUND TRUE )
endif( LIBPOPPLER_QT4 AND LIBPOPPLER AND INCLUDEPOPPLER )
endif(_PopplerLinkFlags)
if (POPPLER_FOUND)
set(POPPLER_LIBRARY ${_PopplerLinkFlags})
if( LIBPOPPLER AND LIBPOPPLER_QT4 )
set( POPPLER_LIBRARY ${LIBPOPPLER} ${LIBPOPPLER_QT4} )
endif( LIBPOPPLER AND LIBPOPPLER_QT4 )
# the cflags for poppler-qt4 can contain more than one include path
separate_arguments(_PopplerCflags)
@ -44,6 +56,9 @@ if (POPPLER_FOUND)
string(REGEX REPLACE "-I(.+)" "\\1" _includedir "${_includedir}")
set(POPPLER_INCLUDE_DIR ${POPPLER_INCLUDE_DIR} ${_includedir})
endforeach(_includedir)
if( INCLUDEPOPPLER )
set( POPPLER_INCLUDE_DIR ${INCLUDEPOPPLER} )
endif( INCLUDEPOPPLER )
# check whether we're using poppler 0.6
set(CMAKE_REQUIRED_INCLUDES ${POPPLER_INCLUDE_DIR} ${QT_INCLUDE_DIR})