summaryrefslogtreecommitdiffstats
path: root/kpdf/xpdf
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/xpdf
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/xpdf')
-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
8 files changed, 218 insertions, 1 deletions
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
+)