[poppler] 2 commits - CMakeLists.txt cmake/modules

Pino Toscano pino at kemper.freedesktop.org
Thu Jun 26 11:19:17 PDT 2008


 CMakeLists.txt                      |   18 +++++++++---------
 cmake/modules/FindLIBOPENJPEG.cmake |   11 ++---------
 2 files changed, 11 insertions(+), 18 deletions(-)

New commits:
commit 9e9543b105b39f8b0048c00fc94741e43ad615e9
Author: Pino Toscano <pino at kde.org>
Date:   Thu Jun 26 20:19:06 2008 +0200

    use FindPackageHandleStandardArgs

diff --git a/cmake/modules/FindLIBOPENJPEG.cmake b/cmake/modules/FindLIBOPENJPEG.cmake
index d883a4c..973aa16 100644
--- a/cmake/modules/FindLIBOPENJPEG.cmake
+++ b/cmake/modules/FindLIBOPENJPEG.cmake
@@ -29,15 +29,8 @@ else (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR)
     set(LIBOPENJPEG_FOUND TRUE)
   endif(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES)
 
-  IF (LIBOPENJPEG_FOUND)
-    IF (NOT LIBOPENJPEG_FIND_QUIETLY)
-       MESSAGE(STATUS "Found libopenjpeg: ${LIBOPENJPEG_LIBRARIES}")
-    ENDIF (NOT LIBOPENJPEG_FIND_QUIETLY)
-  ELSE (LIBOPENJPEG_FOUND)
-    IF (LIBOPENJPEG_FIND_REQUIRED)
-       MESSAGE(FATAL_ERROR "Could not find libopenjpeg library")
-    ENDIF (LIBOPENJPEG_FIND_REQUIRED)
-  ENDIF (LIBOPENJPEG_FOUND)
+  include(FindPackageHandleStandardArgs)
+  find_package_handle_standard_args(LibOpenJPEG DEFAULT_MSG LIBOPENJPEG_LIBRARIES LIBOPENJPEG_INCLUDE_DIR)
 
 endif (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR)
 
commit fec41ceddebe194f139bcc5b2f3fa74e7d1ae502
Author: Pino Toscano <pino at kde.org>
Date:   Thu Jun 26 20:18:27 2008 +0200

    need to use LIBOPENJPEG_FOUND, as it really represents whether
    libopenjpeg was found or not

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c70684..026d4c1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -93,9 +93,9 @@ if(ENABLE_ABIWORD)
   include_directories(${LIBXML2_INCLUDE_DIR})
   add_definitions(${LIBXML2_DEFINITIONS})
 endif(ENABLE_ABIWORD)
-if(ENABLE_LIBOPENJPEG)
+if(LIBOPENJPEG_FOUND)
   include_directories(${LIBOPENJPEG_INCLUDE_DIR})
-endif(ENABLE_LIBOPENJPEG)
+endif(LIBOPENJPEG_FOUND)
 
 if(DEFINED COMPILE_WARNINGS)
 else(DEFINED COMPILE_WARNINGS)
@@ -216,16 +216,16 @@ if(ENABLE_ZLIB)
   )
   set(poppler_LIBS ${poppler_LIBS} ${ZLIB_LIBRARIES})
 endif(ENABLE_ZLIB)
-if(ENABLE_LIBOPENJPEG)
+if(LIBOPENJPEG_FOUND)
   set(poppler_SRCS ${poppler_SRCS}
     poppler/JPEG2000Stream.cc
   )
   set(poppler_LIBS ${poppler_LIBS} ${LIBOPENJPEG_LIBRARIES})
-else (ENABLE_LIBOPENJPEG)
+else (LIBOPENJPEG_FOUND)
   set(poppler_SRCS ${poppler_SRCS}
     poppler/JPXStream.cc
   )
-endif(ENABLE_LIBOPENJPEG)
+endif(LIBOPENJPEG_FOUND)
 if(ENABLE_ABIWORD)
   set(poppler_SRCS ${poppler_SRCS}
     poppler/ABWOutputDev.cc
@@ -317,15 +317,15 @@ if(ENABLE_XPDF_HEADERS)
     poppler/Movie.h
     ${CMAKE_CURRENT_BINARY_DIR}/poppler/poppler-config.h
     DESTINATION include/poppler)
-  if(ENABLE_LIBOPENJPEG)
+  if(LIBOPENJPEG_FOUND)
     install(FILES
       poppler/JPEG2000Stream.h
       DESTINATION include/poppler)
-  else (ENABLE_LIBOPENJPEG)
+  else(LIBOPENJPEG_FOUND)
     install(FILES
       poppler/JPXStream.h
       DESTINATION include/poppler)
-  endif(ENABLE_LIBOPENJPEG)
+  endif(LIBOPENJPEG_FOUND)
   if(ENABLE_SPLASH)
     install(FILES
       poppler/SplashOutputDev.h
@@ -414,5 +414,5 @@ show_end_message("glib wrapper" GLIB_FOUND)
 # message("  use gtk-doc:        $enable_gtk_doc") # TODO
 show_end_message("use libjpeg" ENABLE_LIBJPEG)
 show_end_message("use zlib" ENABLE_ZLIB)
-show_end_message("use libopenjpeg" ENABLE_LIBOPENJPEG)
+show_end_message("use libopenjpeg" LIBOPENJPEG_FOUND)
 show_end_message("command line utils" ENABLE_UTILS)


More information about the poppler mailing list