summaryrefslogtreecommitdiffstats
path: root/kpdf
diff options
context:
space:
mode:
authorsamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-27 17:32:57 +0000
committersamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-27 17:32:57 +0000
commitb41a969e527c35ffacc8dc6b5601d5c6f81896b1 (patch)
treedd0a9c7fddfd7e83a7e5c4877763c5ce82b7ab74 /kpdf
parent46fd5b93bebf092d7aca1635bf966395671c8a9b (diff)
downloadtdegraphics-b41a969e527c35ffacc8dc6b5601d5c6f81896b1.tar.gz
tdegraphics-b41a969e527c35ffacc8dc6b5601d5c6f81896b1.zip
[kdegraphics/kpdf] added cmake support
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1229555 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpdf')
-rw-r--r--kpdf/CMakeLists.txt51
-rw-r--r--kpdf/conf/CMakeLists.txt31
-rw-r--r--kpdf/core/CMakeLists.txt33
-rw-r--r--kpdf/core/generator_kimgio/CMakeLists.txt23
-rw-r--r--kpdf/core/generator_pdf/CMakeLists.txt30
-rw-r--r--kpdf/shell/CMakeLists.txt36
-rw-r--r--kpdf/ui/CMakeLists.txt29
-rw-r--r--kpdf/xpdf/CMakeLists.txt17
-rw-r--r--kpdf/xpdf/ConfigureChecks.cmake57
-rw-r--r--kpdf/xpdf/aconf.h1
-rw-r--r--kpdf/xpdf/fofi/CMakeLists.txt26
-rw-r--r--kpdf/xpdf/goo/CMakeLists.txt26
-rw-r--r--kpdf/xpdf/goo/ConfigureChecks.cmake24
-rw-r--r--kpdf/xpdf/splash/CMakeLists.txt32
-rw-r--r--kpdf/xpdf/xpdf/CMakeLists.txt36
15 files changed, 451 insertions, 1 deletions
diff --git a/kpdf/CMakeLists.txt b/kpdf/CMakeLists.txt
new file mode 100644
index 00000000..682038d2
--- /dev/null
+++ b/kpdf/CMakeLists.txt
@@ -0,0 +1,51 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+add_subdirectory( xpdf )
+add_subdirectory( conf )
+add_subdirectory( core )
+add_subdirectory( ui )
+add_subdirectory( shell )
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/xpdf
+ ${CMAKE_CURRENT_SOURCE_DIR}/xpdf/goo
+ ${CMAKE_BINARY_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+)
+
+
+##### other data ################################
+
+tde_install_icons( kpdf )
+install( FILES kpdf_part.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
+install( FILES part.rc DESTINATION ${DATA_INSTALL_DIR}/kpdfpart )
+
+
+##### libkpdfpart (module) ######################
+
+tde_add_kpart( libkpdfpart AUTOMOC
+ SOURCES
+ dcop.skel error.cpp part.cpp
+ LINK
+ kpdfconf-static kpdfui-static kpdfcore-static generatorkimgio-static
+ generatorpdf-static xpdf-static goo-static splash-static fofi-static
+ kutils-shared kdeprint-shared kparts-shared ${PAPER_LIBRARY} ${XFT_LIBRARIES}
+ DEPENDENCIES kpdfconf-static
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
diff --git a/kpdf/conf/CMakeLists.txt b/kpdf/conf/CMakeLists.txt
new file mode 100644
index 00000000..56e1410d
--- /dev/null
+++ b/kpdf/conf/CMakeLists.txt
@@ -0,0 +1,31 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}/..
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+
+##### other data ################################
+
+install( FILES kpdf.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
+
+
+##### kpdfconf (static) #########################
+
+tde_add_library( kpdfconf STATIC_PIC
+ SOURCES
+ dlggeneral.ui dlgperformance.ui dlgaccessibility.ui
+ dlgpresentation.ui preferencesdialog.cpp settings.kcfgc
+)
diff --git a/kpdf/core/CMakeLists.txt b/kpdf/core/CMakeLists.txt
new file mode 100644
index 00000000..1f9f1661
--- /dev/null
+++ b/kpdf/core/CMakeLists.txt
@@ -0,0 +1,33 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+add_subdirectory( generator_pdf )
+add_subdirectory( generator_kimgio )
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}/..
+ ${CMAKE_CURRENT_SOURCE_DIR}/..
+ ${CMAKE_CURRENT_SOURCE_DIR}/../xpdf
+ ${CMAKE_CURRENT_SOURCE_DIR}/../xpdf/goo
+ ${CMAKE_BINARY_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+
+##### kpdfcore (static) #########################
+
+tde_add_library( kpdfcore STATIC_PIC AUTOMOC
+ SOURCES
+ document.cpp link.cpp page.cpp pagetransition.cpp
+ DEPENDENCIES kpdfconf-static
+)
diff --git a/kpdf/core/generator_kimgio/CMakeLists.txt b/kpdf/core/generator_kimgio/CMakeLists.txt
new file mode 100644
index 00000000..d9651f2a
--- /dev/null
+++ b/kpdf/core/generator_kimgio/CMakeLists.txt
@@ -0,0 +1,23 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}/../..
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+
+##### generatorkimgio (static) ##################
+
+tde_add_library( generatorkimgio STATIC_PIC
+ SOURCES generator_kimgio.cpp
+)
diff --git a/kpdf/core/generator_pdf/CMakeLists.txt b/kpdf/core/generator_pdf/CMakeLists.txt
new file mode 100644
index 00000000..9d63a86e
--- /dev/null
+++ b/kpdf/core/generator_pdf/CMakeLists.txt
@@ -0,0 +1,30 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}/../..
+ ${CMAKE_CURRENT_SOURCE_DIR}/../..
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../xpdf
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../xpdf/goo
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../xpdf/splash
+ ${CMAKE_BINARY_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+
+##### generatorpdf (static) #####################
+
+tde_add_library( generatorpdf STATIC_PIC
+ SOURCES
+ generator_pdf.cpp gp_outputdev.cpp
+ DEPENDENCIES kpdfconf-static
+)
diff --git a/kpdf/shell/CMakeLists.txt b/kpdf/shell/CMakeLists.txt
new file mode 100644
index 00000000..59f84caa
--- /dev/null
+++ b/kpdf/shell/CMakeLists.txt
@@ -0,0 +1,36 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+)
+
+
+##### other data ################################
+
+install( FILES kpdf.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
+install( FILES shell.rc DESTINATION ${DATA_INSTALL_DIR}/kpdf )
+
+
+##### kpdf (executable) #########################
+
+tde_add_executable( kpdf AUTOMOC
+ SOURCES main.cpp shell.cpp
+ LINK kparts-shared
+ DESTINATION ${BIN_INSTALL_DIR}
+)
diff --git a/kpdf/ui/CMakeLists.txt b/kpdf/ui/CMakeLists.txt
new file mode 100644
index 00000000..f6cc04ee
--- /dev/null
+++ b/kpdf/ui/CMakeLists.txt
@@ -0,0 +1,29 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}/..
+ ${CMAKE_CURRENT_SOURCE_DIR}/..
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+
+##### kpdfui (static) ###########################
+
+tde_add_library( kpdfui STATIC_PIC AUTOMOC
+ SOURCES
+ pagepainter.cpp pageview.cpp pageviewutils.cpp minibar.cpp
+ thumbnaillist.cpp searchwidget.cpp toc.cpp propertiesdialog.cpp
+ presentationwidget.cpp
+ DEPENDENCIES kpdfconf-static
+)
diff --git a/kpdf/xpdf/CMakeLists.txt b/kpdf/xpdf/CMakeLists.txt
new file mode 100644
index 00000000..64e51142
--- /dev/null
+++ b/kpdf/xpdf/CMakeLists.txt
@@ -0,0 +1,17 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include( ConfigureChecks.cmake )
+
+add_subdirectory( fofi )
+add_subdirectory( goo )
+add_subdirectory( splash )
+add_subdirectory( xpdf )
diff --git a/kpdf/xpdf/ConfigureChecks.cmake b/kpdf/xpdf/ConfigureChecks.cmake
new file mode 100644
index 00000000..b1c33977
--- /dev/null
+++ b/kpdf/xpdf/ConfigureChecks.cmake
@@ -0,0 +1,57 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+pkg_search_module( FREETYPE freetype2 )
+if( FREETYPE_FOUND )
+ set( HAVE_FREETYPE 1 CACHE INTERNAL "" FORCE )
+else( )
+ tde_message_fatal( "freetype2 is required, but was not found on your system" )
+endif( )
+
+
+pkg_search_module( XFT xft )
+if( NOT XFT_FOUND )
+ tde_message_fatal( "Xft is required, but was not found on your system" )
+endif( )
+
+
+find_package( JPEG )
+if( NOT JPEG_FOUND )
+ tde_message_fatal( "jpeg is required, but was not found on your system" )
+endif( )
+
+
+# check for t1lib
+if( WITH_T1LIB )
+ check_include_file( t1lib.h HAVE_T1LIB_H )
+ if( HAVE_T1LIB_H )
+ check_library_exists( t1 T1_InitLib "" HAVE_T1LIB )
+ endif( )
+ if( HAVE_T1LIB_H AND HAVE_T1LIB )
+ set( T1_LIBRARY t1 CACHE INTERNAL "" FORCE )
+ else( )
+ tde_message_fatal( "t1lib is required, but was not found on your system" )
+ endif( )
+endif( )
+
+
+# check for libpaper
+if( WITH_PAPER )
+ check_include_file( paper.h HAVE_PAPER_H )
+ if( HAVE_PAPER_H )
+ check_library_exists( paper paperinit "" HAVE_PAPER )
+ endif( )
+ if( HAVE_PAPER_H AND HAVE_PAPER )
+ set( PAPER_LIBRARY paper CACHE INTERNAL "" FORCE )
+ else( )
+ tde_message_fatal( "libpaper is required, but was not found on your system" )
+ endif( )
+endif( )
diff --git a/kpdf/xpdf/aconf.h b/kpdf/xpdf/aconf.h
index 43b28397..6ebda483 100644
--- a/kpdf/xpdf/aconf.h
+++ b/kpdf/xpdf/aconf.h
@@ -3,7 +3,6 @@
#include <config.h>
-#define HAVE_T1LIB_H 0
#define HAVE_FREETYPE_H HAVE_FREETYPE
#define HAVE_FREETYPE_FREETYPE_H HAVE_FREETYPE
#define OPI_SUPPORT 0
diff --git a/kpdf/xpdf/fofi/CMakeLists.txt b/kpdf/xpdf/fofi/CMakeLists.txt
new file mode 100644
index 00000000..e98957f3
--- /dev/null
+++ b/kpdf/xpdf/fofi/CMakeLists.txt
@@ -0,0 +1,26 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}/..
+ ${CMAKE_CURRENT_SOURCE_DIR}/../goo
+ ${CMAKE_BINARY_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+
+##### fofi (static) #############################
+
+tde_add_library( fofi STATIC_PIC
+ SOURCES
+ FoFiBase.cc FoFiEncodings.cc FoFiTrueType.cc FoFiType1.cc
+ FoFiType1C.cc
+)
diff --git a/kpdf/xpdf/goo/CMakeLists.txt b/kpdf/xpdf/goo/CMakeLists.txt
new file mode 100644
index 00000000..5a5a0ac8
--- /dev/null
+++ b/kpdf/xpdf/goo/CMakeLists.txt
@@ -0,0 +1,26 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include( ConfigureChecks.cmake )
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}/..
+ ${CMAKE_BINARY_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+
+##### goo (static) ##############################
+
+tde_add_library( goo STATIC_PIC
+ SOURCES
+ GHash.cc GList.cc GString.cc gfile.cc gmem.cc gmempp.cc
+)
diff --git a/kpdf/xpdf/goo/ConfigureChecks.cmake b/kpdf/xpdf/goo/ConfigureChecks.cmake
new file mode 100644
index 00000000..ece2791b
--- /dev/null
+++ b/kpdf/xpdf/goo/ConfigureChecks.cmake
@@ -0,0 +1,24 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+check_include_file( "dirent.h" HAVE_DIRENT_H )
+if( NOT HAVE_DIRENT_H )
+ check_include_file( "sys/ndir.h" HAVE_SYS_NDIR_H )
+ if( NOT HAVE_SYS_NDIR_H )
+ check_include_file( "sys/dir.h" HAVE_SYS_DIR_H )
+ if( NOT HAVE_SYS_DIR_H )
+ check_include_file( "ndir.h" HAVE_NDIR_H )
+ if( NOT HAVE_NDIR_H )
+ tde_message_fatal( "dirent.h is missing, this should not happen." )
+ endif( )
+ endif( )
+ endif( )
+endif( )
diff --git a/kpdf/xpdf/splash/CMakeLists.txt b/kpdf/xpdf/splash/CMakeLists.txt
new file mode 100644
index 00000000..a7573b6c
--- /dev/null
+++ b/kpdf/xpdf/splash/CMakeLists.txt
@@ -0,0 +1,32 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}/..
+ ${CMAKE_CURRENT_SOURCE_DIR}/../goo
+ ${CMAKE_CURRENT_SOURCE_DIR}/../fofi
+ ${CMAKE_BINARY_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${FREETYPE_INCLUDE_DIRS}
+)
+
+
+##### splash (static) ###########################
+
+tde_add_library( splash STATIC_PIC
+ SOURCES
+ Splash.cc SplashBitmap.cc SplashClip.cc SplashFTFont.cc
+ SplashFTFontEngine.cc SplashFTFontFile.cc SplashFont.cc
+ SplashFontEngine.cc SplashFontFile.cc SplashFontFileID.cc
+ SplashPath.cc SplashPattern.cc SplashScreen.cc SplashState.cc
+ SplashT1Font.cc SplashT1FontEngine.cc SplashT1FontFile.cc
+ SplashXPath.cc SplashXPathScanner.cc
+)
diff --git a/kpdf/xpdf/xpdf/CMakeLists.txt b/kpdf/xpdf/xpdf/CMakeLists.txt
new file mode 100644
index 00000000..eb5e1762
--- /dev/null
+++ b/kpdf/xpdf/xpdf/CMakeLists.txt
@@ -0,0 +1,36 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}/..
+ ${CMAKE_CURRENT_SOURCE_DIR}/../goo
+ ${CMAKE_CURRENT_SOURCE_DIR}/../fofi
+ ${CMAKE_CURRENT_SOURCE_DIR}/../splash
+ ${CMAKE_BINARY_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${FREETYPE_INCLUDE_DIRS}
+)
+
+
+##### xpdf (static) #############################
+
+tde_add_library( xpdf STATIC_PIC
+ SOURCES
+ Annot.cc Array.cc BuiltinFont.cc BuiltinFontTables.cc
+ Catalog.cc CharCodeToUnicode.cc CMap.cc Decrypt.cc Dict.cc
+ FontEncodingTables.cc Function.cc Gfx.cc GfxFont.cc GfxState.cc
+ GlobalParams.cc JArithmeticDecoder.cc JBIG2Stream.cc Lexer.cc Link.cc
+ NameToCharCode.cc Object.cc Outline.cc OutputDev.cc PDFDoc.cc
+ PDFDocEncoding.cc PreScanOutputDev.cc PSTokenizer.cc Page.cc
+ Parser.cc PSOutputDev.cc SecurityHandler.cc SplashOutputDev.cc
+ Stream.cc JPXStream.cc TextOutputDev.cc UnicodeMap.cc
+ UnicodeTypeTable.cc XRef.cc
+)