From d730cb33db227775c963402b885d1f242c0d508b Mon Sep 17 00:00:00 2001 From: Roger Leigh Date: Fri, 1 Jan 2021 21:45:00 +0000 Subject: cmake: Add faxtable and mkg3states targets --- libtiff/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libtiff/CMakeLists.txt b/libtiff/CMakeLists.txt index 080685db..c4082829 100644 --- a/libtiff/CMakeLists.txt +++ b/libtiff/CMakeLists.txt @@ -167,3 +167,12 @@ if(CXX_SUPPORT) DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}") endif() + +add_executable(mkg3states mkg3states.c tif_fax3.h) +target_link_libraries(mkg3states tiff port) + +add_custom_target(faxtable + DEPENDS mkg3states + COMMAND ${CMAKE_COMMAND} -E rm "tif_fax3sm.c" + COMMAND mkg3states -b -c const "tif_fax3sm.c" + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") -- cgit v1.2.1 From ec3849d1405003202e0442280a5353dfb076f03a Mon Sep 17 00:00:00 2001 From: Roger Leigh Date: Fri, 1 Jan 2021 21:53:36 +0000 Subject: mkg3states: Sync generator with current generated file content --- libtiff/mkg3states.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libtiff/mkg3states.c b/libtiff/mkg3states.c index 2cb9174c..5612a56c 100644 --- a/libtiff/mkg3states.c +++ b/libtiff/mkg3states.c @@ -433,11 +433,19 @@ main(int argc, char* argv[]) fprintf(fd, "/* WARNING, this file was automatically generated by the\n"); fprintf(fd, " mkg3states program */\n"); + fprintf(fd, "#include \n"); fprintf(fd, "#include \"tiff.h\"\n"); fprintf(fd, "#include \"tif_fax3.h\"\n"); WriteTable(fd, MainTable, 128, "TIFFFaxMainTable"); WriteTable(fd, WhiteTable, 4096, "TIFFFaxWhiteTable"); WriteTable(fd, BlackTable, 8192, "TIFFFaxBlackTable"); + fprintf(fd, "/*\n" + " * Local Variables:\n" + " * mode: c\n" + " * c-basic-offset: 8\n" + " * fill-column: 78\n" + " * End:\n" + " */\n"); fclose(fd); return (0); } -- cgit v1.2.1