Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor TIFF decoding #1301

Closed
wants to merge 13 commits into from
33 changes: 29 additions & 4 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,29 @@ if (MSVC)
include_directories("../extra")
endif ()

add_library(heifio STATIC
decoder.h
decoder_y4m.cc
decoder_y4m.h)

target_link_libraries(heifio PRIVATE heif)

find_package(TIFF)
if (TIFF_FOUND)
target_sources(heifio PRIVATE decoder_tiff.cc decoder_tiff.h)
target_link_libraries(heifio PRIVATE TIFF::TIFF)
endif()

set_target_properties(heifio
PROPERTIES
VERSION ${PROJECT_VERSION})


target_compile_definitions(heifio
PUBLIC
LIBHEIF_EXPORTS
HAVE_VISIBILITY)

add_executable(heif-info ${getopt_sources}
heif_info.cc
common.cc
Expand Down Expand Up @@ -47,11 +70,9 @@ add_executable(heif-enc ${getopt_sources}
benchmark.h
benchmark.cc
encoder.cc
decoder_y4m.cc
decoder_y4m.h
common.cc
common.h)
target_link_libraries(heif-enc PRIVATE heif)
target_link_libraries(heif-enc PRIVATE heif heifio)
install(TARGETS heif-enc RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES heif-enc.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)

Expand Down Expand Up @@ -132,11 +153,15 @@ if (TIFF_FOUND)
target_link_libraries(heif-dec PRIVATE TIFF::TIFF)
target_link_libraries(heif-enc PRIVATE TIFF::TIFF)
target_sources(heif-dec PRIVATE encoder_tiff.cc encoder_tiff.h)
target_sources(heif-enc PRIVATE decoder_tiff.cc decoder_tiff.h)
target_compile_definitions(heif-dec PUBLIC HAVE_LIBTIFF=1)
target_compile_definitions(heif-enc PUBLIC HAVE_LIBTIFF=1)
endif ()

include(CTest)
if(BUILD_TESTING)
add_subdirectory (tests)
endif()

message("")
message("=== Active input formats for heif-enc ===")
if (JPEG_FOUND)
Expand Down
Loading
Loading