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

Rename heif-convert to heif-dec (planned for v1.18.0) #996

Merged
merged 12 commits into from
Jun 26, 2024
Merged
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ configure_file(libheif.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libheif.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libheif.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove non-change from diff

# ---

option(WITH_EXAMPLES "Build examples" ON)
Expand Down
21 changes: 12 additions & 9 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,22 @@ install(TARGETS heif-info RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES heif-info.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)


add_executable(heif-convert ${getopt_sources}
add_executable(heif-dec ${getopt_sources}
encoder.cc
encoder.h
encoder_y4m.cc
encoder_y4m.h
heif_convert.cc
heif_dec.cc
../libheif/exif.cc
../libheif/exif.cc
common.cc
common.h)
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)
target_link_libraries(heif-dec PRIVATE heif)
install(TARGETS heif-dec RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES heif-dec.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)

# create symbolic link from the old name `heif-convert` to `heif-dec`
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/heif-dec${CMAKE_EXECUTABLE_SUFFIX} ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/heif-convert${CMAKE_EXECUTABLE_SUFFIX})")
farindk marked this conversation as resolved.
Show resolved Hide resolved


add_executable(heif-enc ${getopt_sources}
Expand Down Expand Up @@ -83,10 +86,10 @@ int main() {
add_definitions(-DHAVE_JPEG_WRITE_ICC_PROFILE=1)
endif ()

target_link_libraries(heif-convert PRIVATE JPEG::JPEG)
target_link_libraries(heif-dec PRIVATE JPEG::JPEG)
target_link_libraries(heif-enc PRIVATE JPEG::JPEG)

target_sources(heif-convert PRIVATE encoder_jpeg.cc encoder_jpeg.h)
target_sources(heif-dec PRIVATE encoder_jpeg.cc encoder_jpeg.h)
target_sources(heif-enc PRIVATE decoder.h decoder_jpeg.cc decoder_jpeg.h)
endif ()

Expand All @@ -95,10 +98,10 @@ find_package(PNG)
if (TARGET PNG::PNG)
add_definitions(-DHAVE_LIBPNG=1)

target_link_libraries(heif-convert PRIVATE PNG::PNG)
target_link_libraries(heif-dec PRIVATE PNG::PNG)
target_link_libraries(heif-enc PRIVATE PNG::PNG)

target_sources(heif-convert PRIVATE encoder_png.cc encoder_png.h)
target_sources(heif-dec PRIVATE encoder_png.cc encoder_png.h)
target_sources(heif-enc PRIVATE decoder_png.cc decoder_png.h)

add_executable(heif-thumbnailer ${getopt_sources}
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions examples/heif_convert.cc → examples/heif_dec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@

static void show_help(const char* argv0)
{
std::cerr << " heif-convert libheif version: " << heif_get_version() << "\n"
<< "-------------------------------------------\n"
"Usage: heif-convert [options] <input-image> [output-image]\n"
std::cerr << " " << argv0 << " libheif version: " << heif_get_version() << "\n"
<< "---------------------------------------\n"
"Usage: " << argv0 << " [options] <input-image> [output-image]\n"
"\n"
"The program determines the output file format from the output filename suffix.\n"
"These suffixes are recognized: jpg, jpeg, png, y4m. If no output filename is specified, 'jpg' is used.\n"
Expand Down
Loading