Hi PoDoFo developers,

I have found a problem which causes libpng not to be
found even if it's available: the module FindPNG.cmake
of the system cmake (I have version 3.0.2 here) seems
to include the system FindZLIB.cmake only, even with
CMAKE_MODULE_PATH set and CMP0017 policy set to NEW
(as is already done in trunk/CMakeLists.txt). So to
make cmake use PoDoFo's FindZLIB.cmake (as the system's
one seems unsuitable for GNU/Linux) I have copied the
system's FindPNG.cmake to cmake/modules in PoDoFo, made
the changes which are attached to this e-mail as a patch,
and build-tested it: it works now.
So please do the same, make the necessary license notice
completions as specified in cmake's FindPNG.cmake (sorry,
IMHO that's your responsibility ;-) ), test and commit
separately to the public repository.

Best regards, mabri
--- cmake/modules/FindPNG.cmake	2014-09-11 15:24:00.000000000 +0000
+++ cmake/modules/FindPNG.cmake	2016-04-26 20:35:13.314347959 +0000
@@ -79,7 +79,7 @@
   if(NOT PNG_LIBRARY)
     find_library(PNG_LIBRARY_RELEASE NAMES ${PNG_NAMES})
     find_library(PNG_LIBRARY_DEBUG NAMES ${PNG_NAMES_DEBUG})
-    include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+    include(SelectLibraryConfigurations)
     select_library_configurations(PNG)
     mark_as_advanced(PNG_LIBRARY_RELEASE PNG_LIBRARY_DEBUG)
   endif()
@@ -116,7 +116,7 @@
 
 # handle the QUIETLY and REQUIRED arguments and set PNG_FOUND to TRUE if
 # all listed variables are TRUE
-include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(PNG
                                   REQUIRED_VARS PNG_LIBRARY PNG_PNG_INCLUDE_DIR
                                   VERSION_VAR PNG_VERSION_STRING)
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to