mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 10:32:57 +01:00
LibPNG Unbundled (#4657)
This commit is contained in:
parent
63bed8c8d3
commit
6d2b26645a
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -190,8 +190,8 @@ jobs:
|
|||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: sudo apt -y update && sudo apt -y install cmake ninja-build libssl-dev unixodbc-dev libmysqlclient-dev redis-server libexpat1-dev zlib1g-dev libpcre3-dev
|
- run: sudo apt -y update && sudo apt -y install cmake ninja-build libssl-dev unixodbc-dev libmysqlclient-dev redis-server libexpat1-dev zlib1g-dev libpcre3-dev libpng-dev
|
||||||
- run: cmake -S. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_TESTS=ON -DPOCO_UNBUNDLED=ON && cmake --build cmake-build --target all
|
- run: cmake -S. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_TESTS=ON -DPOCO_UNBUNDLED=ON -DENABLE_PDF=ON && cmake --build cmake-build --target all
|
||||||
- uses: ./.github/actions/retry-action
|
- uses: ./.github/actions/retry-action
|
||||||
with:
|
with:
|
||||||
timeout_minutes: 90
|
timeout_minutes: 90
|
||||||
|
@ -232,9 +232,9 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(POCO_UNBUNDLED)
|
if(POCO_UNBUNDLED)
|
||||||
message(STATUS "Using external sqlite, zlib, pcre2, expat, ...")
|
message(STATUS "Using external sqlite, zlib, pcre2, expat, libpng, ...")
|
||||||
else()
|
else()
|
||||||
message(STATUS "Using internal sqlite, zlib, pcre2, expat, ...")
|
message(STATUS "Using internal sqlite, zlib, pcre2, expat, libpng, ...")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Disable fork exec
|
# Disable fork exec
|
||||||
|
@ -90,28 +90,30 @@ POCO_SOURCES(SRCS hpdf
|
|||||||
src/hpdf_xref.c
|
src/hpdf_xref.c
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: Currently only bundled is supported, in future this should also be possible
|
if(POCO_UNBUNDLED)
|
||||||
# with an unbundled version of libpng
|
find_package(PNG REQUIRED)
|
||||||
POCO_SOURCES(SRCS libpng
|
else()
|
||||||
src/png.c
|
POCO_SOURCES(SRCS libpng
|
||||||
src/pngerror.c
|
src/png.c
|
||||||
src/pnggccrd.c
|
src/pngerror.c
|
||||||
src/pngget.c
|
src/pnggccrd.c
|
||||||
src/pngmem.c
|
src/pngget.c
|
||||||
src/pngpread.c
|
src/pngmem.c
|
||||||
src/pngread.c
|
src/pngpread.c
|
||||||
src/pngrio.c
|
src/pngread.c
|
||||||
src/pngrtran.c
|
src/pngrio.c
|
||||||
src/pngrutil.c
|
src/pngrtran.c
|
||||||
src/pngset.c
|
src/pngrutil.c
|
||||||
src/pngtest.c
|
src/pngset.c
|
||||||
src/pngtrans.c
|
src/pngtest.c
|
||||||
src/pngvcrd.c
|
src/pngtrans.c
|
||||||
src/pngwio.c
|
src/pngvcrd.c
|
||||||
src/pngwrite.c
|
src/pngwio.c
|
||||||
src/pngwtran.c
|
src/pngwrite.c
|
||||||
src/pngwutil.c
|
src/pngwtran.c
|
||||||
)
|
src/pngwutil.c
|
||||||
|
)
|
||||||
|
endif(POCO_UNBUNDLED)
|
||||||
|
|
||||||
# Version Resource
|
# Version Resource
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
@ -132,9 +134,14 @@ set_target_properties(PDF
|
|||||||
)
|
)
|
||||||
|
|
||||||
if(POCO_UNBUNDLED)
|
if(POCO_UNBUNDLED)
|
||||||
|
include_directories(${PNG_INCLUDE_DIR})
|
||||||
|
|
||||||
target_link_libraries(PDF PUBLIC ZLIB::ZLIB)
|
target_link_libraries(PDF PUBLIC ZLIB::ZLIB)
|
||||||
|
target_link_libraries(PDF PUBLIC ${PNG_LIBRARY})
|
||||||
target_compile_definitions(PDF PUBLIC POCO_UNBUNDLED)
|
target_compile_definitions(PDF PUBLIC POCO_UNBUNDLED)
|
||||||
|
|
||||||
endif(POCO_UNBUNDLED)
|
endif(POCO_UNBUNDLED)
|
||||||
|
|
||||||
target_link_libraries(PDF PUBLIC Poco::XML Poco::Util)
|
target_link_libraries(PDF PUBLIC Poco::XML Poco::Util)
|
||||||
target_include_directories(PDF
|
target_include_directories(PDF
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
@ -2,6 +2,7 @@ include(CMakeFindDependencyMacro)
|
|||||||
find_dependency(PocoFoundation)
|
find_dependency(PocoFoundation)
|
||||||
if(@POCO_UNBUNDLED@)
|
if(@POCO_UNBUNDLED@)
|
||||||
find_dependency(ZLIB REQUIRED)
|
find_dependency(ZLIB REQUIRED)
|
||||||
|
find_dependency(PNG REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/PocoPDFTargets.cmake")
|
include("${CMAKE_CURRENT_LIST_DIR}/PocoPDFTargets.cmake")
|
||||||
|
Loading…
Reference in New Issue
Block a user