mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 10:13:51 +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
|
||||
steps:
|
||||
- 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: cmake -S. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_TESTS=ON -DPOCO_UNBUNDLED=ON && cmake --build cmake-build --target all
|
||||
- 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 -DENABLE_PDF=ON && cmake --build cmake-build --target all
|
||||
- uses: ./.github/actions/retry-action
|
||||
with:
|
||||
timeout_minutes: 90
|
||||
|
@ -232,9 +232,9 @@ else()
|
||||
endif()
|
||||
|
||||
if(POCO_UNBUNDLED)
|
||||
message(STATUS "Using external sqlite, zlib, pcre2, expat, ...")
|
||||
message(STATUS "Using external sqlite, zlib, pcre2, expat, libpng, ...")
|
||||
else()
|
||||
message(STATUS "Using internal sqlite, zlib, pcre2, expat, ...")
|
||||
message(STATUS "Using internal sqlite, zlib, pcre2, expat, libpng, ...")
|
||||
endif()
|
||||
|
||||
# Disable fork exec
|
||||
|
@ -90,28 +90,30 @@ POCO_SOURCES(SRCS hpdf
|
||||
src/hpdf_xref.c
|
||||
)
|
||||
|
||||
# TODO: Currently only bundled is supported, in future this should also be possible
|
||||
# with an unbundled version of libpng
|
||||
POCO_SOURCES(SRCS libpng
|
||||
src/png.c
|
||||
src/pngerror.c
|
||||
src/pnggccrd.c
|
||||
src/pngget.c
|
||||
src/pngmem.c
|
||||
src/pngpread.c
|
||||
src/pngread.c
|
||||
src/pngrio.c
|
||||
src/pngrtran.c
|
||||
src/pngrutil.c
|
||||
src/pngset.c
|
||||
src/pngtest.c
|
||||
src/pngtrans.c
|
||||
src/pngvcrd.c
|
||||
src/pngwio.c
|
||||
src/pngwrite.c
|
||||
src/pngwtran.c
|
||||
src/pngwutil.c
|
||||
)
|
||||
if(POCO_UNBUNDLED)
|
||||
find_package(PNG REQUIRED)
|
||||
else()
|
||||
POCO_SOURCES(SRCS libpng
|
||||
src/png.c
|
||||
src/pngerror.c
|
||||
src/pnggccrd.c
|
||||
src/pngget.c
|
||||
src/pngmem.c
|
||||
src/pngpread.c
|
||||
src/pngread.c
|
||||
src/pngrio.c
|
||||
src/pngrtran.c
|
||||
src/pngrutil.c
|
||||
src/pngset.c
|
||||
src/pngtest.c
|
||||
src/pngtrans.c
|
||||
src/pngvcrd.c
|
||||
src/pngwio.c
|
||||
src/pngwrite.c
|
||||
src/pngwtran.c
|
||||
src/pngwutil.c
|
||||
)
|
||||
endif(POCO_UNBUNDLED)
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
@ -132,9 +134,14 @@ set_target_properties(PDF
|
||||
)
|
||||
|
||||
if(POCO_UNBUNDLED)
|
||||
include_directories(${PNG_INCLUDE_DIR})
|
||||
|
||||
target_link_libraries(PDF PUBLIC ZLIB::ZLIB)
|
||||
target_link_libraries(PDF PUBLIC ${PNG_LIBRARY})
|
||||
target_compile_definitions(PDF PUBLIC POCO_UNBUNDLED)
|
||||
|
||||
endif(POCO_UNBUNDLED)
|
||||
|
||||
target_link_libraries(PDF PUBLIC Poco::XML Poco::Util)
|
||||
target_include_directories(PDF
|
||||
PUBLIC
|
||||
|
@ -2,6 +2,7 @@ include(CMakeFindDependencyMacro)
|
||||
find_dependency(PocoFoundation)
|
||||
if(@POCO_UNBUNDLED@)
|
||||
find_dependency(ZLIB REQUIRED)
|
||||
find_dependency(PNG REQUIRED)
|
||||
endif()
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/PocoPDFTargets.cmake")
|
||||
|
Loading…
Reference in New Issue
Block a user