summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Richardson <arichardson.kde@gmail.com>2015-04-14 19:04:26 (GMT)
committerAlex Richardson <arichardson.kde@gmail.com>2015-04-14 19:04:26 (GMT)
commitcfc82ee9b0684da2281db0ac81583c77f4bac74f (patch)
tree12a3cfe8f309ab1e7d3fccb53628fc7a57e618fe
parent0436b34a985c3440efdd28c6ab5b9098ead89aef (diff)
Be explicit about the target dependencies
-rw-r--r--CMakeLists.txt19
-rw-r--r--autotests/parttest.cpp4
-rw-r--r--core/area.h1
-rw-r--r--core/document.h2
-rw-r--r--generators/comicbook/CMakeLists.txt2
-rw-r--r--generators/djvu/CMakeLists.txt2
-rw-r--r--generators/dvi/CMakeLists.txt2
-rw-r--r--generators/fax/CMakeLists.txt2
-rw-r--r--generators/fictionbook/CMakeLists.txt2
-rw-r--r--generators/kimgio/CMakeLists.txt2
-rw-r--r--generators/ooo/CMakeLists.txt2
-rw-r--r--generators/plucker/CMakeLists.txt2
-rw-r--r--generators/poppler/CMakeLists.txt2
-rw-r--r--generators/spectre/CMakeLists.txt2
-rw-r--r--generators/tiff/CMakeLists.txt2
-rw-r--r--generators/txt/CMakeLists.txt2
-rw-r--r--generators/xps/CMakeLists.txt2
17 files changed, 30 insertions, 22 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 56c9976..e166022 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,8 @@ project(okular)
cmake_minimum_required(VERSION 2.8.12)
-set(QT_MIN_VERSION "5.2.0")
+set(QT_REQUIRED_VERSION "5.2.0")
+set(KF5_REQUIRED_VERSION "5.8.0")
find_package(ECM 1.7.0 CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
@@ -19,15 +20,15 @@ include(KDECMakeSettings)
include(ECMAddTests)
include(ECMAddAppIcon)
-find_package(Qt5 CONFIG REQUIRED COMPONENTS Core DBus Test Widgets PrintSupport Svg Qml Quick)
-find_package(Qt5 OPTIONAL_COMPONENTS TextToSpeech)
+find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Core DBus Test Widgets PrintSupport Svg Qml Quick)
+find_package(Qt5 ${QT_REQUIRED_VERSION} OPTIONAL_COMPONENTS TextToSpeech)
if (NOT Qt5TextToSpeech_FOUND)
message(STATUS "Qt5TextToSpeech not found, speech features will be disabled")
else()
add_definitions(-DHAVE_SPEECH)
endif()
-find_package(KF5 REQUIRED COMPONENTS
+find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS
Activities
Archive
Bookmarks
@@ -178,6 +179,7 @@ kconfig_add_kcfg_files(okularcore_SRCS conf/settings_core.kcfgc )
add_library(okularcore SHARED ${okularcore_SRCS})
generate_export_header(okularcore BASE_NAME okularcore)
+target_include_directories(okularcore INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}>")
# Special handling for linking okularcore on OSX/Apple
IF(APPLE)
@@ -185,6 +187,7 @@ IF(APPLE)
ENDIF(APPLE)
target_link_libraries(okularcore
+PRIVATE
${OKULAR_IOKIT}
KF5::Archive
KF5::JS
@@ -196,6 +199,12 @@ target_link_libraries(okularcore
Phonon::phonon4qt5
${MATH_LIB}
${ZLIB_LIBRARIES}
+PUBLIC # these are included from the installed headers
+ KF5::CoreAddons
+ KF5::XmlGui
+ KF5::ConfigGui
+ Qt5::PrintSupport
+ Qt5::Widgets
)
if(LibKScreen_FOUND)
@@ -285,7 +294,7 @@ kconfig_add_kcfg_files(okularpart_SRCS conf/settings.kcfgc )
add_library(okularpart MODULE ${okularpart_SRCS})
generate_export_header(okularpart BASE_NAME okularpart)
-target_link_libraries(okularpart okularcore Qt5::Svg KF5::Parts ${MATH_LIB} Phonon::phonon4qt5 KF5::Solid)
+target_link_libraries(okularpart okularcore Qt5::Svg KF5::Parts ${MATH_LIB} Phonon::phonon4qt5 KF5::Solid KF5::KDELibs4Support KF5::Wallet KF5::Archive)
if (Qt5TextToSpeech_FOUND)
target_link_libraries(okularpart Qt5::TextToSpeech)
diff --git a/autotests/parttest.cpp b/autotests/parttest.cpp
index 1dd23d4..a2a7c1b 100644
--- a/autotests/parttest.cpp
+++ b/autotests/parttest.cpp
@@ -41,7 +41,7 @@ class PartThatHijacksQueryClose : public Okular::Part
{
public:
PartThatHijacksQueryClose(QWidget* parentWidget, QObject* parent,
- const QVariantList& args, KComponentData componentData)
+ const QVariantList& args)
: Okular::Part(parentWidget, parent, args),
behavior(PassThru)
{}
@@ -84,7 +84,7 @@ void PartTest::testReload()
void PartTest::testCanceledReload()
{
QVariantList dummyArgs;
- PartThatHijacksQueryClose part(NULL, NULL, dummyArgs, KGlobal::mainComponent());
+ PartThatHijacksQueryClose part(NULL, NULL, dummyArgs);
QVERIFY( openDocument(&part, KDESRCDIR "data/file1.pdf") );
// When queryClose() returns false, the reload operation is canceled (as if
diff --git a/core/area.h b/core/area.h
index 4a66ea0..4f891c0 100644
--- a/core/area.h
+++ b/core/area.h
@@ -15,7 +15,6 @@
#include <QtGui/QPainterPath>
#include <QtGui/QTransform>
#include <QtCore/QDebug>
-#include <math.h>
#include "global.h"
#include "okularcore_export.h"
diff --git a/core/document.h b/core/document.h
index 8994c85..dab0364 100644
--- a/core/document.h
+++ b/core/document.h
@@ -22,13 +22,13 @@
#include <QtPrintSupport/QPrinter>
#include <QtXml/QDomDocument>
-#include <kcomponentdata.h>
#include <QMimeType>
#include <QUrl>
class QPrintDialog;
class KBookmark;
class KConfigDialog;
+class KComponentData;
class KXMLGUIClient;
class DocumentItem;
diff --git a/generators/comicbook/CMakeLists.txt b/generators/comicbook/CMakeLists.txt
index 68ca1d2..eb5e9bc 100644
--- a/generators/comicbook/CMakeLists.txt
+++ b/generators/comicbook/CMakeLists.txt
@@ -19,7 +19,7 @@ add_library(okularGenerator_comicbook MODULE ${okularGenerator_comicbook_PART_SR
target_link_libraries(okularGenerator_comicbook okularcore KF5::KIOCore)
if (UNIX)
find_package(KF5 REQUIRED Pty)
- target_link_libraries(okularGenerator_comicbook KF5::Pty )
+ target_link_libraries(okularGenerator_comicbook KF5::Pty KF5::I18n KF5::Archive KF5::KDELibs4Support)
endif (UNIX)
install(TARGETS okularGenerator_comicbook DESTINATION ${KDE_INSTALL_PLUGINDIR})
diff --git a/generators/djvu/CMakeLists.txt b/generators/djvu/CMakeLists.txt
index 8ac4b45..a482bcb 100644
--- a/generators/djvu/CMakeLists.txt
+++ b/generators/djvu/CMakeLists.txt
@@ -15,7 +15,7 @@ set(okularGenerator_djvu_SRCS
add_library(okularGenerator_djvu MODULE ${okularGenerator_djvu_SRCS})
-target_link_libraries(okularGenerator_djvu okularcore ${DJVULIBRE_LIBRARY} KF5::KDELibs4Support Qt5::Gui Qt5::PrintSupport)
+target_link_libraries(okularGenerator_djvu okularcore ${DJVULIBRE_LIBRARY} KF5::KDELibs4Support)
install(TARGETS okularGenerator_djvu DESTINATION ${KDE_INSTALL_PLUGINDIR})
diff --git a/generators/dvi/CMakeLists.txt b/generators/dvi/CMakeLists.txt
index 30a9fb9..f800a58 100644
--- a/generators/dvi/CMakeLists.txt
+++ b/generators/dvi/CMakeLists.txt
@@ -48,7 +48,7 @@ set(okularGenerator_dvi_SRCS
add_library(okularGenerator_dvi MODULE ${okularGenerator_dvi_SRCS})
-target_link_libraries(okularGenerator_dvi okularcore)
+target_link_libraries(okularGenerator_dvi okularcore KF5::I18n KF5::KDELibs4Support)
if (FREETYPE_FOUND)
target_link_libraries(okularGenerator_dvi ${FREETYPE_LIBRARIES})
endif (FREETYPE_FOUND)
diff --git a/generators/fax/CMakeLists.txt b/generators/fax/CMakeLists.txt
index 6fc7c31..ab70f9a 100644
--- a/generators/fax/CMakeLists.txt
+++ b/generators/fax/CMakeLists.txt
@@ -9,7 +9,7 @@ set(okularGenerator_fax_PART_SRCS generator_fax.cpp faxdocument.cpp faxexpand.cp
add_library(okularGenerator_fax MODULE ${okularGenerator_fax_PART_SRCS})
-target_link_libraries(okularGenerator_fax okularcore Qt5::Xml)
+target_link_libraries(okularGenerator_fax okularcore KF5::I18n Qt5::Xml)
install(TARGETS okularGenerator_fax DESTINATION ${KDE_INSTALL_PLUGINDIR})
diff --git a/generators/fictionbook/CMakeLists.txt b/generators/fictionbook/CMakeLists.txt
index aa5c01e..a638b36 100644
--- a/generators/fictionbook/CMakeLists.txt
+++ b/generators/fictionbook/CMakeLists.txt
@@ -15,7 +15,7 @@ set(okularGenerator_fb_PART_SRCS
add_library(okularGenerator_fb MODULE ${okularGenerator_fb_PART_SRCS})
-target_link_libraries(okularGenerator_fb okularcore KF5::KIOCore Qt5::Xml)
+target_link_libraries(okularGenerator_fb okularcore KF5::Archive KF5::I18n KF5::KIOCore Qt5::Xml)
install(TARGETS okularGenerator_fb DESTINATION ${KDE_INSTALL_PLUGINDIR})
diff --git a/generators/kimgio/CMakeLists.txt b/generators/kimgio/CMakeLists.txt
index 58cfaf4..b59fcd8 100644
--- a/generators/kimgio/CMakeLists.txt
+++ b/generators/kimgio/CMakeLists.txt
@@ -8,7 +8,7 @@ include_directories(
set(okularGenerator_kimgio_PART_SRCS generator_kimgio.cpp )
add_library(okularGenerator_kimgio MODULE ${okularGenerator_kimgio_PART_SRCS})
-target_link_libraries(okularGenerator_kimgio okularcore KF5::KExiv2)
+target_link_libraries(okularGenerator_kimgio okularcore KF5::KExiv2 KF5::KDELibs4Support)
install(TARGETS okularGenerator_kimgio DESTINATION ${KDE_INSTALL_PLUGINDIR})
add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" )
diff --git a/generators/ooo/CMakeLists.txt b/generators/ooo/CMakeLists.txt
index 3637607..e8672cb 100644
--- a/generators/ooo/CMakeLists.txt
+++ b/generators/ooo/CMakeLists.txt
@@ -27,7 +27,7 @@ set(okularGenerator_ooo_PART_SRCS
add_library(okularGenerator_ooo MODULE ${okularGenerator_ooo_PART_SRCS})
-target_link_libraries(okularGenerator_ooo okularcore KF5::KIOCore ${MATH_LIB} Qt5::Xml)
+target_link_libraries(okularGenerator_ooo okularcore KF5::KIOCore KF5::Archive KF5::I18n KF5::Wallet KF5::KDELibs4Support ${MATH_LIB} Qt5::Xml)
if (Qca-qt5_FOUND)
target_link_libraries(okularGenerator_ooo okularcore qca-qt5)
endif ()
diff --git a/generators/plucker/CMakeLists.txt b/generators/plucker/CMakeLists.txt
index 2d275dd..35bb3cc 100644
--- a/generators/plucker/CMakeLists.txt
+++ b/generators/plucker/CMakeLists.txt
@@ -23,7 +23,7 @@ set(okularGenerator_plucker_SRCS
add_library(okularGenerator_plucker MODULE ${okularGenerator_plucker_SRCS} ${qunpluck_SRCS})
-target_link_libraries(okularGenerator_plucker okularcore KF5::KIOCore ${MATH_LIB} ${JPEG_LIBRARY} ${ZLIB_LIBRARY})
+target_link_libraries(okularGenerator_plucker okularcore KF5::KIOCore KF5::I18n ${MATH_LIB} ${JPEG_LIBRARY} ${ZLIB_LIBRARY})
install(TARGETS okularGenerator_plucker DESTINATION ${KDE_INSTALL_PLUGINDIR})
diff --git a/generators/poppler/CMakeLists.txt b/generators/poppler/CMakeLists.txt
index aa7e467..2cf9c8c 100644
--- a/generators/poppler/CMakeLists.txt
+++ b/generators/poppler/CMakeLists.txt
@@ -35,7 +35,7 @@ kconfig_add_kcfg_files(okularGenerator_poppler_PART_SRCS conf/pdfsettings.kcfgc
add_library(okularGenerator_poppler MODULE ${okularGenerator_poppler_PART_SRCS})
-target_link_libraries(okularGenerator_poppler ${POPPLER_LIBRARY} okularcore Qt5::Xml Qt5::Widgets Qt5::Gui )
+target_link_libraries(okularGenerator_poppler ${POPPLER_LIBRARY} okularcore KF5::I18n KF5::KDELibs4Support Qt5::Xml)
install(TARGETS okularGenerator_poppler DESTINATION ${KDE_INSTALL_PLUGINDIR})
diff --git a/generators/spectre/CMakeLists.txt b/generators/spectre/CMakeLists.txt
index b6e344f..4e84f67 100644
--- a/generators/spectre/CMakeLists.txt
+++ b/generators/spectre/CMakeLists.txt
@@ -23,7 +23,7 @@ kconfig_add_kcfg_files(okularGenerator_ghostview_SRCS conf/gssettings.kcfgc )
add_library(okularGenerator_ghostview MODULE ${okularGenerator_ghostview_SRCS})
-target_link_libraries(okularGenerator_ghostview okularcore ${LIBSPECTRE_LIBRARY} KF5::KDELibs4Support Qt5::Xml Qt5::PrintSupport)
+target_link_libraries(okularGenerator_ghostview okularcore ${LIBSPECTRE_LIBRARY} KF5::KDELibs4Support Qt5::Xml)
install(TARGETS okularGenerator_ghostview DESTINATION ${KDE_INSTALL_PLUGINDIR})
diff --git a/generators/tiff/CMakeLists.txt b/generators/tiff/CMakeLists.txt
index 833d660..b1d6bb2 100644
--- a/generators/tiff/CMakeLists.txt
+++ b/generators/tiff/CMakeLists.txt
@@ -11,7 +11,7 @@ set(okularGenerator_tiff_SRCS
)
add_library(okularGenerator_tiff MODULE ${okularGenerator_tiff_SRCS})
-target_link_libraries(okularGenerator_tiff okularcore ${TIFF_LIBRARIES})
+target_link_libraries(okularGenerator_tiff okularcore ${TIFF_LIBRARIES} KF5::KDELibs4Support)
install(TARGETS okularGenerator_tiff DESTINATION ${KDE_INSTALL_PLUGINDIR})
diff --git a/generators/txt/CMakeLists.txt b/generators/txt/CMakeLists.txt
index e0f9801..b9bb5d3 100644
--- a/generators/txt/CMakeLists.txt
+++ b/generators/txt/CMakeLists.txt
@@ -14,7 +14,7 @@ set(okularGenerator_txt_SRCS
add_library(okularGenerator_txt MODULE ${okularGenerator_txt_SRCS})
-target_link_libraries(okularGenerator_txt okularcore Qt5::Core)
+target_link_libraries(okularGenerator_txt okularcore Qt5::Core KF5::I18n)
install(TARGETS okularGenerator_txt DESTINATION ${KDE_INSTALL_PLUGINDIR})
diff --git a/generators/xps/CMakeLists.txt b/generators/xps/CMakeLists.txt
index 41e973a..5aa3e80 100644
--- a/generators/xps/CMakeLists.txt
+++ b/generators/xps/CMakeLists.txt
@@ -12,7 +12,7 @@ set(okularGenerator_xps_SRCS
add_library(okularGenerator_xps MODULE ${okularGenerator_xps_SRCS})
-target_link_libraries(okularGenerator_xps okularcore KF5::KIOCore Qt5::Xml)
+target_link_libraries(okularGenerator_xps okularcore KF5::Archive KF5::I18n KF5::KIOCore Qt5::PrintSupport Qt5::Xml)
install(TARGETS okularGenerator_xps DESTINATION ${KDE_INSTALL_PLUGINDIR})