Skip to content

Commit

Permalink
examples: add zlib dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
bradh committed Oct 7, 2023
1 parent c679a76 commit 2110542
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ target_link_libraries(heif-convert PRIVATE heif)
install(TARGETS heif-convert RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES heif-convert.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)


add_executable(heif-enc ${getopt_sources}
heif_enc.cc
../libheif/exif.cc
Expand Down Expand Up @@ -107,8 +106,8 @@ if (PNG_FOUND)
target_sources(heif-enc PRIVATE decoder_png.cc decoder_png.h)
endif ()


if (PNG_FOUND)
find_package(ZLIB)
if (PNG_FOUND AND ZLIB_FOUND)
add_executable(heif-thumbnailer ${getopt_sources}
encoder.cc
encoder.h
Expand All @@ -119,8 +118,9 @@ if (PNG_FOUND)
../libheif/exif.cc
common.cc
common.h)
target_link_libraries(heif-thumbnailer heif ${PNG_LIBRARIES})
target_link_libraries(heif-thumbnailer heif ${PNG_LIBRARIES} ${ZLIB_LIBRARY})
target_include_directories(heif-thumbnailer PRIVATE ${PNG_INCLUDE_DIR})
target_include_directories(heif-thumbnailer PRIVATE ${ZLIB_INCLUDE_DIRS})

install(TARGETS heif-thumbnailer RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES heif-thumbnailer.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
Expand Down

0 comments on commit 2110542

Please sign in to comment.