vcpkg/ports/poco/unbundled_pdf.patch
2019-08-15 00:19:37 -07:00

31 lines
919 B
Diff

diff --git a/PDF/CMakeLists.txt b/PDF/CMakeLists.txt
index 3e44906..ae8fe6e 100644
--- a/PDF/CMakeLists.txt
+++ b/PDF/CMakeLists.txt
@@ -97,6 +97,8 @@ POCO_SOURCES(SRCS hpdf
# TODO: Currently only bundled is supported, in future this should also be possible
# with an unbundled version of libpng
+find_package(png REQUIRED)
+if (0)
POCO_SOURCES( SRCS libpng
src/png.c
src/pngerror.c
@@ -117,6 +119,7 @@ POCO_SOURCES( SRCS libpng
src/pngwtran.c
src/pngwutil.c
)
+endif(0)
# Version Resource
if(MSVC AND NOT POCO_STATIC)
@@ -136,7 +139,7 @@ set_target_properties( "${LIBNAME}"
DEFINE_SYMBOL PDF_EXPORTS
)
-target_link_libraries( "${LIBNAME}" ${SYSLIBS} XML Util Foundation )
+target_link_libraries( "${LIBNAME}" ${SYSLIBS} XML Util Foundation ${PNG_LIBRARIES})
target_include_directories( "${LIBNAME}"
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>