summaryrefslogtreecommitdiff
path: root/html
diff options
context:
space:
mode:
authorBob Friesenhahn <bfriesen@simple.dallas.tx.us>2015-06-25 02:27:58 +0000
committerBob Friesenhahn <bfriesen@simple.dallas.tx.us>2015-06-25 02:27:58 +0000
commit5b90af247ea3801ce93ec0922b8b81396caa885d (patch)
tree59c2be6a595ee4a0d14dd093d95040263a87d8b3 /html
parent0319952da29b7b6504b7af800c1ee8b22c9dd6da (diff)
downloadlibtiff-git-5b90af247ea3801ce93ec0922b8b81396caa885d.tar.gz
* CMakeLists.txt: Add CMake patchset by Roger Leigh as posted to
libtiff mailing list on Mon, 22 Jun 2015 21:21:01 +0100. Several corrections to ensure that the autotools build still works were added by me. I have not yet tested the build using 'cmake' or MSVC with 'nmake'.
Diffstat (limited to 'html')
-rw-r--r--html/CMakeLists.txt87
-rw-r--r--html/images/CMakeLists.txt46
-rw-r--r--html/man/CMakeLists.txt115
-rw-r--r--html/man/HtmlDoc.cmake50
4 files changed, 298 insertions, 0 deletions
diff --git a/html/CMakeLists.txt b/html/CMakeLists.txt
new file mode 100644
index 00000000..5f34e1e5
--- /dev/null
+++ b/html/CMakeLists.txt
@@ -0,0 +1,87 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# Permission to use, copy, modify, distribute, and sell this software and
+# its documentation for any purpose is hereby granted without fee, provided
+# that (i) the above copyright notices and this permission notice appear in
+# all copies of the software and related documentation, and (ii) the names of
+# Sam Leffler and Silicon Graphics may not be used in any advertising or
+# publicity relating to the software without the specific, prior written
+# permission of Sam Leffler and Silicon Graphics.
+#
+# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+#
+# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+
+set(docfiles
+ addingtags.html
+ bugs.html
+ build.html
+ contrib.html
+ document.html
+ images.html
+ index.html
+ internals.html
+ intro.html
+ libtiff.html
+ misc.html
+ support.html
+ TIFFTechNote2.html
+ tools.html
+ v3.4beta007.html
+ v3.4beta016.html
+ v3.4beta018.html
+ v3.4beta024.html
+ v3.4beta028.html
+ v3.4beta029.html
+ v3.4beta031.html
+ v3.4beta032.html
+ v3.4beta033.html
+ v3.4beta034.html
+ v3.4beta035.html
+ v3.4beta036.html
+ v3.5.1.html
+ v3.5.2.html
+ v3.5.3.html
+ v3.5.4.html
+ v3.5.5.html
+ v3.5.6-beta.html
+ v3.5.7.html
+ v3.6.0.html
+ v3.6.1.html
+ v3.7.0alpha.html
+ v3.7.0beta.html
+ v3.7.0beta2.html
+ v3.7.0.html
+ v3.7.1.html
+ v3.7.2.html
+ v3.7.3.html
+ v3.7.4.html
+ v3.8.0.html
+ v3.8.1.html
+ v3.8.2.html
+ v3.9.0beta.html
+ v3.9.1.html
+ v3.9.2.html
+ v4.0.0.html
+ v4.0.1.html
+ v4.0.2.html
+ v4.0.3.html
+ v4.0.4beta.html)
+
+install(FILES ${docfiles}
+ DESTINATION "${LIBTIFF_DOCDIR}/html")
+
+add_subdirectory(images)
+add_subdirectory(man)
+
+extra_dist(${docfiles})
diff --git a/html/images/CMakeLists.txt b/html/images/CMakeLists.txt
new file mode 100644
index 00000000..e25f9f62
--- /dev/null
+++ b/html/images/CMakeLists.txt
@@ -0,0 +1,46 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# Permission to use, copy, modify, distribute, and sell this software and
+# its documentation for any purpose is hereby granted without fee, provided
+# that (i) the above copyright notices and this permission notice appear in
+# all copies of the software and related documentation, and (ii) the names of
+# Sam Leffler and Silicon Graphics may not be used in any advertising or
+# publicity relating to the software without the specific, prior written
+# permission of Sam Leffler and Silicon Graphics.
+#
+# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+#
+# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+
+set(docfiles
+ back.gif
+ bali.jpg
+ cat.gif
+ cover.jpg
+ cramps.gif
+ dave.gif
+ info.gif
+ jello.jpg
+ jim.gif
+ note.gif
+ oxford.gif
+ quad.jpg
+ ring.gif
+ smallliz.jpg
+ strike.gif
+ warning.gif)
+
+install(FILES ${docfiles}
+ DESTINATION "${LIBTIFF_DOCDIR}/html/images")
+
+extra_dist(${docfiles})
diff --git a/html/man/CMakeLists.txt b/html/man/CMakeLists.txt
new file mode 100644
index 00000000..f7c98ac0
--- /dev/null
+++ b/html/man/CMakeLists.txt
@@ -0,0 +1,115 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# Permission to use, copy, modify, distribute, and sell this software and
+# its documentation for any purpose is hereby granted without fee, provided
+# that (i) the above copyright notices and this permission notice appear in
+# all copies of the software and related documentation, and (ii) the names of
+# Sam Leffler and Silicon Graphics may not be used in any advertising or
+# publicity relating to the software without the specific, prior written
+# permission of Sam Leffler and Silicon Graphics.
+#
+# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+#
+# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+
+set(indexfile index.html)
+
+set(docfiles
+ libtiff.3tiff.html
+ TIFFbuffer.3tiff.html
+ TIFFClose.3tiff.html
+ TIFFcodec.3tiff.html
+ TIFFcolor.3tiff.html
+ TIFFDataWidth.3tiff.html
+ TIFFError.3tiff.html
+ TIFFFieldDataType.3tiff.html
+ TIFFFieldName.3tiff.html
+ TIFFFieldPassCount.3tiff.html
+ TIFFFieldReadCount.3tiff.html
+ TIFFFieldTag.3tiff.html
+ TIFFFieldWriteCount.3tiff.html
+ TIFFFlush.3tiff.html
+ TIFFGetField.3tiff.html
+ TIFFmemory.3tiff.html
+ TIFFOpen.3tiff.html
+ TIFFPrintDirectory.3tiff.html
+ TIFFquery.3tiff.html
+ TIFFReadDirectory.3tiff.html
+ TIFFReadEncodedStrip.3tiff.html
+ TIFFReadEncodedTile.3tiff.html
+ TIFFReadRawStrip.3tiff.html
+ TIFFReadRawTile.3tiff.html
+ TIFFReadRGBAImage.3tiff.html
+ TIFFReadRGBAStrip.3tiff.html
+ TIFFReadRGBATile.3tiff.html
+ TIFFReadScanline.3tiff.html
+ TIFFReadTile.3tiff.html
+ TIFFRGBAImage.3tiff.html
+ TIFFSetDirectory.3tiff.html
+ TIFFSetField.3tiff.html
+ TIFFsize.3tiff.html
+ TIFFstrip.3tiff.html
+ TIFFswab.3tiff.html
+ TIFFtile.3tiff.html
+ TIFFWarning.3tiff.html
+ TIFFWriteDirectory.3tiff.html
+ TIFFWriteEncodedStrip.3tiff.html
+ TIFFWriteEncodedTile.3tiff.html
+ TIFFWriteRawStrip.3tiff.html
+ TIFFWriteRawTile.3tiff.html
+ TIFFWriteScanline.3tiff.html
+ TIFFWriteTile.3tiff.html
+ bmp2tiff.1.html
+ fax2ps.1.html
+ fax2tiff.1.html
+ gif2tiff.1.html
+ pal2rgb.1.html
+ ppm2tiff.1.html
+ ras2tiff.1.html
+ raw2tiff.1.html
+ rgb2ycbcr.1.html
+ sgi2tiff.1.html
+ thumbnail.1.html
+ tiff2bw.1.html
+ tiff2pdf.1.html
+ tiff2ps.1.html
+ tiff2rgba.1.html
+ tiffcmp.1.html
+ tiffcp.1.html
+ tiffcrop.1.html
+ tiffdither.1.html
+ tiffdump.1.html
+ tiffgt.1.html
+ tiffinfo.1.html
+ tiffmedian.1.html
+ tiffset.1.html
+ tiffsplit.1.html
+ tiffsv.1.html)
+
+set(doc_DATA ${indexfile} ${docfiles})
+
+extra_dist(${doc_DATA})
+
+install(FILES ${doc_DATA}
+ DESTINATION "${LIBTIFF_DOCDIR}/html/man")
+
+# htmldoc target to regenerate HTML files
+string(REPLACE ";" "^" escaped_docfiles "${docfiles}")
+add_custom_target(htmldoc
+ COMMAND "${CMAKE_COMMAND}"
+ "-DMANSRCDIR=${PROJECT_SOURCE_DIR}/man"
+ "-DHTMLMANDIR=${PROJECT_SOURCE_DIR}/html/man"
+ "-DINDEXFILE=${indexfile}"
+ "-DDOCFILES=${escaped_docfiles}"
+ -P "${CMAKE_CURRENT_SOURCE_DIR}/HtmlDoc.cmake")
+
diff --git a/html/man/HtmlDoc.cmake b/html/man/HtmlDoc.cmake
new file mode 100644
index 00000000..7e5a1a0c
--- /dev/null
+++ b/html/man/HtmlDoc.cmake
@@ -0,0 +1,50 @@
+# CMake documentation generation for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# Permission to use, copy, modify, distribute, and sell this software and
+# its documentation for any purpose is hereby granted without fee, provided
+# that (i) the above copyright notices and this permission notice appear in
+# all copies of the software and related documentation, and (ii) the names of
+# Sam Leffler and Silicon Graphics may not be used in any advertising or
+# publicity relating to the software without the specific, prior written
+# permission of Sam Leffler and Silicon Graphics.
+#
+# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+#
+# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+
+string(REPLACE "^" ";" DOCFILES "${DOCFILES}")
+
+set(INDEXSTART "<html><head><title>Libtiff HTML manpage index</title></head><body bgcolor=white><ul><h2>Man Pages</h2><p>")
+set(INDEXEND "</ul></body></html>")
+
+set(indexcontent "${INDEXSTART}
+")
+
+foreach(doc ${DOCFILES})
+ string(REGEX REPLACE "(.*)\\.html$" "\\1" man "${doc}")
+ execute_process(COMMAND groff -Thtml -mandoc "${MANSRCDIR}/${man}"
+ OUTPUT_FILE "${HTMLMANDIR}/${doc}"
+ RESULT_VARIABLE GROFF_STATUS)
+ if(GROFF_STATUS)
+ message(FATAL_ERROR "Groff failed to generate HTML manpage")
+ endif()
+ message(STATUS "Generated ${HTMLMANDIR}/${doc} from ${MANSRCDIR}/${man}")
+
+ set(indexcontent "${indexcontent}<li><a href=\"${doc}\">${man}</a>
+")
+endforeach()
+
+set(indexcontent "${indexcontent}${INDEXEND}
+")
+file(WRITE "${HTMLMANDIR}/${INDEXFILE}" "${indexcontent}")
+message(STATUS "Generated ${HTMLMANDIR}/${INDEXFILE}")