Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
Okular
Commits
bc155c68
Commit
bc155c68
authored
Aug 09, 2014
by
Albert Astals Cid
Browse files
Poppler-qt4 -> 5
parent
643026fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
cmake/modules/FindPoppler.cmake
View file @
bc155c68
...
...
@@ -24,7 +24,7 @@ if(NOT WIN32)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
include
(
FindPkgConfig
)
pkg_check_modules
(
_pc_poppler poppler-qt
4
)
pkg_check_modules
(
_pc_poppler poppler-qt
5
)
if
(
_pc_poppler_FOUND
)
if
(
NOT
"
${
_pc_poppler_VERSION
}
"
VERSION_GREATER 0.5.3
)
set
(
_poppler_version_bad TRUE
)
...
...
@@ -35,15 +35,15 @@ endif(NOT WIN32)
if
(
NOT _poppler_version_bad
)
set
(
POPPLER_FOUND FALSE
)
find_library
(
POPPLER_LIBRARY poppler-qt
4
find_library
(
POPPLER_LIBRARY poppler-qt
5
HINTS
${
_pc_poppler_LIBRARY_DIRS
}
)
find_path
(
POPPLER_INCLUDE_DIR poppler-qt
4
.h
find_path
(
POPPLER_INCLUDE_DIR poppler-qt
5
.h
HINTS
${
_pc_poppler_INCLUDE_DIRS
}
PATH_SUFFIXES poppler/qt
4
PATH_SUFFIXES poppler/qt
5
)
find_path
(
POPPLER_INCLUDE_DIR_core qt
4
/poppler-qt
4
.h
find_path
(
POPPLER_INCLUDE_DIR_core qt
5
/poppler-qt
5
.h
HINTS
${
_pc_poppler_INCLUDE_DIRS
}
PATH_SUFFIXES poppler
)
...
...
@@ -57,67 +57,11 @@ endif(NOT _poppler_version_bad)
if
(
POPPLER_FOUND
)
include
(
CheckCXXSourceCompiles
)
# check whether we're using poppler 0.6
set
(
CMAKE_REQUIRED_INCLUDES
${
POPPLER_INCLUDE_DIR
}
${
QT_INCLUDE_DIR
}
)
set
(
CMAKE_REQUIRED_LIBRARIES
${
POPPLER_LIBRARY
}
${
QT_QTCORE_LIBRARY
}
${
QT_QTGUI_LIBRARY
}
${
QT_QTXML_LIBRARY
}
)
check_cxx_source_compiles
(
"
#include <poppler-qt4.h>
int main()
{
Poppler::Document::RenderHint hint = Poppler::Document::TextHinting;
return 0;
}
"
HAVE_POPPLER_0_12_1
)
check_cxx_source_compiles
(
"
#include <poppler-qt4.h>
void debugFunction(const QString &message, const QVariant &closure)
{
}
int main()
{
Poppler::setDebugErrorFunction(debugFunction, QVariant());
return 0;
}
"
HAVE_POPPLER_0_16
)
check_cxx_source_compiles
(
"
#include <poppler-qt4.h>
#include <poppler-media.h>
int main()
{
Poppler::ScreenAnnotation *annot = 0;
Poppler::LinkRendition *link = 0;
const Poppler::LinkMovie::Operation operation = Poppler::LinkMovie::Play;
return 0;
}
"
HAVE_POPPLER_0_20
)
check_cxx_source_compiles
(
"
#include <poppler-qt4.h>
#include <poppler-annotation.h>
#include <poppler-link.h>
int main()
{
Poppler::MovieObject *movie = 0;
Poppler::Document *doc = 0;
movie->showPosterImage();
const Poppler::Annotation::AdditionalActionType type = Poppler::Annotation::PageOpeningAction;
const Poppler::LinkRendition::RenditionAction action = Poppler::LinkRendition::NoRendition;
const Poppler::Document::FormType formType = doc->formType();
return 0;
}
"
HAVE_POPPLER_0_22
)
check_cxx_source_compiles
(
"
#include <poppler-qt4.h>
#include <poppler-qt5.h>
int main()
{
Poppler::Document::RenderHint hint = Poppler::Document::ThinLineSolid;
...
...
@@ -126,7 +70,7 @@ int main()
"
HAVE_POPPLER_0_24
)
check_cxx_source_compiles
(
"
#include <poppler-qt
4
.h>
#include <poppler-qt
5
.h>
int main()
{
Poppler::Page *p = 0;
...
...
@@ -141,30 +85,19 @@ int main()
set
(
popplerVersionMessage
"0.28"
)
elseif
(
HAVE_POPPLER_0_24
)
set
(
popplerVersionMessage
"0.24"
)
elseif
(
HAVE_POPPLER_0_22
)
set
(
popplerVersionMessage
"0.22"
)
elseif
(
HAVE_POPPLER_0_20
)
set
(
popplerVersionMessage
"0.20"
)
elseif
(
HAVE_POPPLER_0_16
)
set
(
popplerVersionMessage
"0.16"
)
elseif
(
HAVE_POPPLER_0_12_1
)
set
(
popplerVersionMessage
"0.12.1"
)
else
(
HAVE_POPPLER_0_28
)
set
(
popplerVersionMessage
"0.5.4"
)
endif
(
HAVE_POPPLER_0_28
)
endif
()
if
(
NOT Poppler_FIND_QUIETLY
)
message
(
STATUS
"Found Poppler-Qt
4
:
${
POPPLER_LIBRARY
}
, (>=
${
popplerVersionMessage
}
)"
)
message
(
STATUS
"Found Poppler-Qt
5
:
${
POPPLER_LIBRARY
}
, (>=
${
popplerVersionMessage
}
)"
)
endif
(
NOT Poppler_FIND_QUIETLY
)
else
(
POPPLER_FOUND
)
if
(
Poppler_FIND_REQUIRED
)
message
(
FATAL_ERROR
"Could NOT find Poppler-Qt
4
"
)
message
(
FATAL_ERROR
"Could NOT find Poppler-Qt
5
"
)
endif
(
Poppler_FIND_REQUIRED
)
message
(
STATUS
"Could not find OPTIONAL package Poppler-Qt
4
"
)
message
(
STATUS
"Could not find OPTIONAL package Poppler-Qt
5
"
)
endif
(
POPPLER_FOUND
)
# ensure that they are cached
set
(
POPPLER_INCLUDE_DIR
${
POPPLER_INCLUDE_DIR
}
CACHE INTERNAL
"The Poppler-Qt4 include path"
)
set
(
POPPLER_LIBRARY
${
POPPLER_LIBRARY
}
CACHE INTERNAL
"The Poppler-Qt4 library"
)
set
(
HAVE_POPPLER_0_12_1
${
HAVE_POPPLER_0_12_1
}
CACHE INTERNAL
"Whether the version of Poppler-Qt4 is >= 0.12.1"
)
set
(
POPPLER_INCLUDE_DIR
${
POPPLER_INCLUDE_DIR
}
CACHE INTERNAL
"The Poppler-Qt5 include path"
)
set
(
POPPLER_LIBRARY
${
POPPLER_LIBRARY
}
CACHE INTERNAL
"The Poppler-Qt5 library"
)
endif
(
POPPLER_INCLUDE_DIR AND POPPLER_LIBRARY
)
generators/CMakeLists.txt
View file @
bc155c68
set
(
LIBSPECTRE_MINIMUM_VERSION
"0.2"
)
find_package
(
Poppler
"0.12.1"
)
set_package_properties
(
"Poppler-Qt
4
"
PROPERTIES
set_package_properties
(
"Poppler-Qt
5
"
PROPERTIES
DESCRIPTION
"A PDF rendering library"
URL
"http://poppler.freedesktop.org"
TYPE RECOMMENDED
...
...
@@ -79,9 +79,9 @@ set_package_properties("libqmobipocket" PROPERTIES
# let's enable the generators properly configured
if
(
POPPLER_FOUND
AND HAVE_POPPLER_0_12_1
)
if
(
POPPLER_FOUND
)
add_subdirectory
(
poppler
)
endif
(
POPPLER_FOUND
AND HAVE_POPPLER_0_12_1
)
endif
(
POPPLER_FOUND
)
if
(
LIBSPECTRE_FOUND
)
add_subdirectory
(
spectre
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment