diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-31 06:24:04 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-31 06:24:04 +0000 |
commit | 83b9df8edf5bf3eb61e5d2e956695f96500359c1 (patch) | |
tree | 0a8ddc5f0c1700cec2aaed2bc3960f08dc7efa4f /kfile-plugins | |
parent | 56e79472366b958a2ffa31f2cf02cd908d064c8e (diff) | |
download | tdegraphics-83b9df8edf5bf3eb61e5d2e956695f96500359c1.tar.gz tdegraphics-83b9df8edf5bf3eb61e5d2e956695f96500359c1.zip |
Fix kdegraphics CMake compilation
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1244149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kfile-plugins')
-rw-r--r-- | kfile-plugins/CMakeLists.txt | 1 | ||||
-rw-r--r-- | kfile-plugins/dependencies/CMakeLists.txt (renamed from kfile-plugins/pdf/ConfigureChecks.cmake) | 6 | ||||
-rw-r--r-- | kfile-plugins/dependencies/poppler-tqt/CMakeLists.txt | 44 | ||||
-rw-r--r-- | kfile-plugins/dependencies/poppler-tqt/poppler-document.cc | 4 | ||||
-rw-r--r-- | kfile-plugins/dependencies/poppler-tqt/poppler-qt.h | 2 | ||||
-rw-r--r-- | kfile-plugins/pdf/CMakeLists.txt | 6 |
6 files changed, 54 insertions, 9 deletions
diff --git a/kfile-plugins/CMakeLists.txt b/kfile-plugins/CMakeLists.txt index c35c329e..238bc4b2 100644 --- a/kfile-plugins/CMakeLists.txt +++ b/kfile-plugins/CMakeLists.txt @@ -9,6 +9,7 @@ # ################################################# +add_subdirectory( dependencies ) add_subdirectory( dvi ) add_subdirectory( png ) add_subdirectory( ps ) diff --git a/kfile-plugins/pdf/ConfigureChecks.cmake b/kfile-plugins/dependencies/CMakeLists.txt index 28a617f1..e00ca923 100644 --- a/kfile-plugins/pdf/ConfigureChecks.cmake +++ b/kfile-plugins/dependencies/CMakeLists.txt @@ -9,8 +9,4 @@ # ################################################# -# poppler-qt -pkg_search_module( POPPLER_QT poppler-qt ) -if( NOT POPPLER_QT_FOUND ) - tde_message_fatal( "poppler-qt is required, but was not found on your system" ) -endif( ) +add_subdirectory( poppler-tqt )
\ No newline at end of file diff --git a/kfile-plugins/dependencies/poppler-tqt/CMakeLists.txt b/kfile-plugins/dependencies/poppler-tqt/CMakeLists.txt new file mode 100644 index 00000000..39984c71 --- /dev/null +++ b/kfile-plugins/dependencies/poppler-tqt/CMakeLists.txt @@ -0,0 +1,44 @@ +################################################# +# +# (C) 2010-2011 Calvin Morrison +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +project( libpoppler-tqt ) + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} + ${CMAKE_SOURCE_DIR}/kfile-plugins/dependencies/poppler-tqt + /usr/include/poppler +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + +##### headers ################################### + +install( FILES + poppler-qt.h poppler-page-transition.h poppler-link-qt3.h + DESTINATION ${INCLUDE_INSTALL_DIR}/kde ) + +##### poppler-tqt (shared) ############################ + +tde_add_library( poppler-tqt SHARED AUTOMOC + SOURCES + poppler-document.cc poppler-fontinfo.cc + poppler-link.cc poppler-page.cc + poppler-page-transition.cc poppler-page-transition-private.h + poppler-private.cc poppler-private.h + VERSION 0.0.0 + LINK poppler ${TQT_LIBRARIES} + DESTINATION ${LIB_INSTALL_DIR} +)
\ No newline at end of file diff --git a/kfile-plugins/dependencies/poppler-tqt/poppler-document.cc b/kfile-plugins/dependencies/poppler-tqt/poppler-document.cc index 40e45469..93d5a49c 100644 --- a/kfile-plugins/dependencies/poppler-tqt/poppler-document.cc +++ b/kfile-plugins/dependencies/poppler-tqt/poppler-document.cc @@ -316,7 +316,11 @@ bool Document::print(const TQString &fileName, TQValueList<int> pageList, double bool Document::print(const TQString &file, TQValueList<int> pageList, double hDPI, double vDPI, int rotate, int paperWidth, int paperHeight) { +#ifdef POPPLER_016 + PSOutputDev *psOut = new PSOutputDev(file.latin1(), &(data->doc), data->doc.getXRef(), data->doc.getCatalog(), NULL, 1, data->doc.getNumPages(), psModePS, paperWidth, paperHeight); +#else PSOutputDev *psOut = new PSOutputDev(file.latin1(), data->doc.getXRef(), data->doc.getCatalog(), NULL, 1, data->doc.getNumPages(), psModePS, paperWidth, paperHeight); +#endif if (psOut->isOk()) { TQValueList<int>::iterator it; diff --git a/kfile-plugins/dependencies/poppler-tqt/poppler-qt.h b/kfile-plugins/dependencies/poppler-tqt/poppler-qt.h index 9150ee3b..db2a402e 100644 --- a/kfile-plugins/dependencies/poppler-tqt/poppler-qt.h +++ b/kfile-plugins/dependencies/poppler-tqt/poppler-qt.h @@ -23,6 +23,8 @@ #ifndef __POPPLER_TQT_H__ #define __POPPLER_TQT_H__ +#define POPPLER_016 + #include "poppler-link-qt3.h" #include "poppler-page-transition.h" diff --git a/kfile-plugins/pdf/CMakeLists.txt b/kfile-plugins/pdf/CMakeLists.txt index 748b70ed..c75dcf3f 100644 --- a/kfile-plugins/pdf/CMakeLists.txt +++ b/kfile-plugins/pdf/CMakeLists.txt @@ -9,14 +9,12 @@ # ################################################# -include( ConfigureChecks.cmake ) - include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${TDE_INCLUDE_DIR} ${TQT_INCLUDE_DIRS} - ${POPPLER_QT_INCLUDE_DIRS} + ${CMAKE_SOURCE_DIR}/kfile-plugins/dependencies/poppler-tqt ) link_directories( @@ -33,6 +31,6 @@ install( FILES kfile_pdf.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) tde_add_kpart( kfile_pdf AUTOMOC SOURCES kfile_pdf.cpp - LINK kio-shared ${POPPLER_QT_LIBRARIES} + LINK kio-shared -L${CMAKE_BINARY_DIR}/kfile-plugins/dependencies/poppler-tqt -lpoppler-tqt DESTINATION ${PLUGIN_INSTALL_DIR} ) |