aboutsummaryrefslogtreecommitdiff
path: root/ports/poco/unbundled_pdf.patch
blob: e7f88f03559daa3eec0a9fe2b213b816059469a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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>