[poppler] [PATCH] Various buildsystem updates

Maciej Mrozowski reavertm at gmail.com
Sun Jan 24 16:08:11 PST 2010


This should make cmake<->autotools more in sync


From fa3ac56eb4fc83fc4b00e4022642998037fc4691 Mon Sep 17 00:00:00 2001
From: Maciej Mrozowski <reavertm at gmail.com>
Date: Mon, 25 Jan 2010 00:31:51 +0100
Subject: [PATCH] Buildsystem updates:
 - [CMake] install goo/PNGWriter.h and goo/JpegWriter when libpng and openjpeg 
found, correspondingly
 - [CMake] install poppler-layer.h (sync with autotools)
 - [autotools] do not install private header poppler-page-transition-private.h
 - [CMake] Fix building when cmake run with -DBUILD_GTK_TESTS=OFF or -
DBUILD_QT4_TESTS=OFF
 - [CMake] Install manpages for utils

---
 CMakeLists.txt       |    8 ++++++++
 glib/CMakeLists.txt  |    9 +++++----
 qt4/CMakeLists.txt   |    6 ++++--
 qt4/src/Makefile.am  |    3 +--
 test/CMakeLists.txt  |    4 ++--
 utils/CMakeLists.txt |    8 +++++++-
 6 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5986611..4dd6e73 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -363,6 +363,11 @@ if(ENABLE_XPDF_HEADERS)
     goo/FixedPoint.h
     goo/gstrtod.h
     DESTINATION include/poppler/goo)
+  if(PNG_FOUND)
+    install(FILES
+      goo/PNGWriter.h
+      DESTINATION include/poppler/goo)
+  endif(PNG_FOUND)
   install(FILES
     fofi/FoFiBase.h
     fofi/FoFiEncodings.h
@@ -374,6 +379,9 @@ if(ENABLE_XPDF_HEADERS)
     install(FILES
       poppler/JPEG2000Stream.h
       DESTINATION include/poppler)
+    install(FILES
+      goo/JpegWriter.h
+      DESTINATION include/poppler/goo)
   else(LIBOPENJPEG_FOUND)
     install(FILES
       poppler/JPXStream.h
diff --git a/glib/CMakeLists.txt b/glib/CMakeLists.txt
index 28cc1ab..206610b 100644
--- a/glib/CMakeLists.txt
+++ b/glib/CMakeLists.txt
@@ -14,9 +14,9 @@ endif (GDK_FOUND)

 configure_file(poppler-features.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/poppler-
features.h @ONLY)

-if (GTK_FOUND)
+if (GTK_FOUND AND BUILD_GTK_TESTS)
   add_subdirectory(demo)
-endif (GTK_FOUND)
+endif (GTK_FOUND AND BUILD_GTK_TESTS)

 set(poppler_glib_public_headers
   poppler-action.h
@@ -26,6 +26,7 @@ set(poppler_glib_public_headers
   poppler-attachment.h
   poppler-form-field.h
   poppler-annot.h
+  poppler-layer.h
   poppler.h
 )

@@ -97,11 +98,11 @@ install(FILES
   DESTINATION include/poppler/glib)


-if (GDK_FOUND)
+if (GDK_FOUND AND BUILD_GTK_TESTS)
   set(test_poppler_glib_SRCS
     test-poppler-glib.cc
   )
   poppler_add_test(test-poppler-glib BUILD_GTK_TESTS 
${test_poppler_glib_SRCS})
   target_link_libraries(test-poppler-glib poppler-glib ${GDK2_LIBRARIES})
-endif (GDK_FOUND)
+endif (GDK_FOUND AND BUILD_GTK_TESTS)

diff --git a/qt4/CMakeLists.txt b/qt4/CMakeLists.txt
index a364abf..461ed77 100644
--- a/qt4/CMakeLists.txt
+++ b/qt4/CMakeLists.txt
@@ -1,3 +1,5 @@
 add_subdirectory(src)
-add_subdirectory(tests)
-add_subdirectory(demos)
+if(BUILD_QT4_TESTS)
+  add_subdirectory(tests)
+  add_subdirectory(demos)
+endif(BUILD_QT4_TESTS)
diff --git a/qt4/src/Makefile.am b/qt4/src/Makefile.am
index 7e982e7..10ac221 100644
--- a/qt4/src/Makefile.am
+++ b/qt4/src/Makefile.am
@@ -16,8 +16,7 @@ poppler_include_HEADERS =			\
 	poppler-form.h				\
 	poppler-optcontent.h			\
 	poppler-export.h			\
-	poppler-page-transition.h		\
-	poppler-page-transition-private.h
+	poppler-page-transition.h

 lib_LTLIBRARIES = libpoppler-qt4.la

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 478cb31..2c6ec36 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -10,7 +10,7 @@ if (ENABLE_SPLASH)

 endif (ENABLE_SPLASH)

-if (GTK_FOUND)
+if (GTK_FOUND AND BUILD_GTK_TESTS)

   add_definitions(${GTK2_CFLAGS})

@@ -41,7 +41,7 @@ if (GTK_FOUND)

   endif (HAVE_CAIRO)

-endif (GTK_FOUND)
+endif (GTK_FOUND AND BUILD_GTK_TESTS)

 set (pdf_fullrewrite_SRCS
   pdf-fullrewrite.cc
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
index f5d4911..59aea8f 100644
--- a/utils/CMakeLists.txt
+++ b/utils/CMakeLists.txt
@@ -17,6 +17,7 @@ if (ENABLE_SPLASH)
   add_executable(pdftoppm ${pdftoppm_SOURCES})
   target_link_libraries(pdftoppm ${common_libs})
   install(TARGETS pdftoppm DESTINATION bin)
+  install(FILES pdftoppm.1 DESTINATION share/man/man1)
 endif (ENABLE_SPLASH)

 # pdffonts
@@ -26,6 +27,7 @@ set(pdffonts_SOURCES ${common_srcs}
 add_executable(pdffonts ${pdffonts_SOURCES})
 target_link_libraries(pdffonts ${common_libs})
 install(TARGETS pdffonts DESTINATION bin)
+install(FILES pdffonts.1 DESTINATION share/man/man1)

 # pdfimages
 set(pdfimages_SOURCES ${common_srcs}
@@ -36,6 +38,7 @@ set(pdfimages_SOURCES ${common_srcs}
 add_executable(pdfimages ${pdfimages_SOURCES})
 target_link_libraries(pdfimages ${common_libs})
 install(TARGETS pdfimages DESTINATION bin)
+install(FILES pdfimages.1 DESTINATION share/man/man1)

 # pdfinfo
 set(pdfinfo_SOURCES ${common_srcs}
@@ -44,6 +47,7 @@ set(pdfinfo_SOURCES ${common_srcs}
 add_executable(pdfinfo ${pdfinfo_SOURCES})
 target_link_libraries(pdfinfo ${common_libs})
 install(TARGETS pdfinfo DESTINATION bin)
+install(FILES pdfinfo.1 DESTINATION share/man/man1)

 # pdftops
 set(pdftops_SOURCES ${common_srcs}
@@ -52,6 +56,7 @@ set(pdftops_SOURCES ${common_srcs}
 add_executable(pdftops ${pdftops_SOURCES})
 target_link_libraries(pdftops ${common_libs})
 install(TARGETS pdftops DESTINATION bin)
+install(FILES pdftops.1 DESTINATION share/man/man1)

 # pdftotext
 set(pdftotext_SOURCES ${common_srcs}
@@ -60,6 +65,7 @@ set(pdftotext_SOURCES ${common_srcs}
 add_executable(pdftotext ${pdftotext_SOURCES})
 target_link_libraries(pdftotext ${common_libs})
 install(TARGETS pdftotext DESTINATION bin)
+install(FILES pdftotext.1 DESTINATION share/man/man1)

 # pdftohtml
 set(pdftohtml_SOURCES ${common_srcs}
@@ -71,6 +77,7 @@ set(pdftohtml_SOURCES ${common_srcs}
 add_executable(pdftohtml ${pdftohtml_SOURCES})
 target_link_libraries(pdftohtml ${common_libs})
 install(TARGETS pdftohtml DESTINATION bin)
+install(FILES pdftohtml.1 DESTINATION share/man/man1)

 if (ENABLE_ABIWORD)
   # pdftoabw
@@ -81,4 +88,3 @@ if (ENABLE_ABIWORD)
   target_link_libraries(pdftoabw ${common_libs})
   install(TARGETS pdftoabw DESTINATION bin)
 endif (ENABLE_ABIWORD)
-
--
1.6.4.4


-- 
regards
MM


More information about the poppler mailing list