在CMake中配置PoDoFo

时间:2016-10-21 12:33:32

标签: c++ cmake pdf-generation cmake-gui podofo

PoDoFo requirement Page表示zlibfreetype2是mandotory library,其余是可选的。

我已经构建了zlibfreetype2并提供了CMake GUI的路径。

当我尝试在CMake中配置 PoDoFo时,我收到了一大堆错误如下:

WANT_LIB64 unset; assuming normal library directory names
Will install libraries to C:/Program Files (x86)/PoDoFo/lib
WARNING: ZLIB debug library will be used even for release builds
Found zlib headers in C:/softwares/4_PoDoFoPdfGeneration/zlib128, library at C: /softwares/4_PoDoFoPdfGeneration/zlib128/BUILD/Debug/zlibstaticd.lib
Could NOT find LIBCRYPTO (missing: LIBCRYPTO_LIBRARY LIBCRYPTO_INCLUDE_DIR) 
OpenSSL's libCrypto not found. Encryption support will be disabled
Could NOT find LIBIDN (missing: LIBIDN_LIBRARY LIBIDN_INCLUDE_DIR) 
Libidn not found. AES-256 Encryption support will be disabled
Could NOT find LIBJPEG (missing: LIBJPEG_LIBRARY LIBJPEG_INCLUDE_DIR) 
libjpeg not found: Library LIBJPEG_LIBRARY_RELEASE-NOTFOUND, headers LIBJPEG_INCLUDE_DIR-NOTFOUND
Libjpeg not found. JPEG support will be disabled
Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) 
Libtiff not found. TIFF support will be disabled
Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR) 
LibPng not found. PNG support will be disabled
Ensure you cppunit installed version is at least 1.12.0
Cppunit not found. No unit tests will be built.
OpenSSL: Could not find the debug and release version of openssl
OpenSSL: Disabling OpenSSL
WARNING: FREETYPE debug library will be used even for release builds
Found freetype library at C:/Program Files (x86)/GnuWin32/FreeType/GnuWin32/lib/freetype.lib, headers C:/Program Files (x86)/GnuWin32/FreeType/GnuWin32/include
Could NOT find Fontconfig (missing: FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR) 
Could NOT find Lua50 (missing: LUA_LIBRARIES LUA_INCLUDE_DIR) 
Could NOT find Lua (missing: LUA_LIBRARIES LUA_INCLUDE_DIR) 
Lua not found - PoDoFoImpose and PoDoFoColor will be built without Lua support
Building multithreaded version of PoDoFo.
Looking for pthread.h
Looking for pthread.h - not found
Found Threads: TRUE 
Building static PoDoFo library
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PNG_LIBRARY (ADVANCED)
linked by target "podofo_static" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/src
linked by target "ContentParser" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/test/ContentParser
linked by target "ContentParser" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/test/ContentParser
linked by target "CreationTest" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/test/CreationTest
linked by target "CreationTest" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/test/CreationTest
linked by target "FilterTest" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/test/FilterTest
linked by target "FilterTest" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/test/FilterTest
linked by target "FormTest" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/test/FormTest
linked by target "FormTest" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/test/FormTest
linked by target "ObjectParserTest" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/test/ObjectParserTest
linked by target "ObjectParserTest" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/test/ObjectParserTest
linked by target "ParserTest" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/test/ParserTest
linked by target "SignatureTest" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/test/SignatureTest
linked by target "SignatureTest" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/test/SignatureTest
linked by target "TokenizerTest" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/test/TokenizerTest
linked by target "TokenizerTest" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/test/TokenizerTest
linked by target "VariantTest" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/test/VariantTest
linked by target "VariantTest" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/test/VariantTest
linked by target "WatermarkTest" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/test/WatermarkTest
linked by target "WatermarkTest" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/test/WatermarkTest
linked by target "podofobox" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/tools/podofobox
linked by target "podofocolor" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/tools/podofocolor
linked by target "podofocountpages" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/tools/podofocountpages
linked by target "podofocrop" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/tools/podofocrop
linked by target "podofoencrypt" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/tools/podofoencrypt
linked by target "podofogc" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/tools/podofogc
linked by target "podofoimgextract" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/tools/podofoimgextract
linked by target "podofoimg2pdf" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/tools/podofoimg2pdf
linked by target "podofomerge" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/tools/podofomerge
linked by target "podofopages" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/tools/podofopages
linked by target "podofopdfinfo" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/tools/podofopdfinfo
linked by target "podofotxt2pdf" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/tools/podofotxt2pdf
linked by target "podofotxtextract" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/tools/podofotxtextract
linked by target "podofouncompress" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/tools/podofouncompress
linked by target "podofoimpose" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/tools/podofoimpose
linked by target "podofoincrementalupdates" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/tools/podofoincrementalupdates
linked by target "podofoxmp" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/tools/podofoxmp
linked by target "helloworld" in directory C:/Siddrth/softwares/4_PoDoFoPdfGeneration/podofo094/examples/helloworld
linked by target "helloworld-base14" in directory C: /softwares/4_PoDoFoPdfGeneration/podofo094/examples/helloworld-base14
Configuring incomplete, errors occurred!
See also "C: /softwares/4_PoDoFoPdfGeneration/podofo094/BUILD/CMakeFiles/CMakeOutput.log".
See also "C: /softwares/4_PoDoFoPdfGeneration/podofo094/BUILD/CMakeFiles/CMakeError.log".

1 个答案:

答案 0 :(得分:0)

您实际上只有一个错误:

  

CMake错误:此项目中使用了以下变量,但是   它们设置为NOTFOUND。请设置它们或确保它们已设置   并在CMake文件中正确测试:PNG_LIBRARY(ADVANCED)

如果您还没有安装/构建libpng库,则必须在cmake_gui的高级变量中设置它的路径。