summaryrefslogtreecommitdiffstats
path: root/kpdf/xpdf/ConfigureChecks.cmake
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/ConfigureChecks.cmake
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/ConfigureChecks.cmake')
-rw-r--r--kpdf/xpdf/ConfigureChecks.cmake57
1 files changed, 57 insertions, 0 deletions
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( )