
Thread
2015.08.29 11:34 "[Tiff] [patch] Docs for cmake build and some minor tweaks", by Roger Leigh
Adds documentation to build.html for building with CMake.
- Adds cmake section, copied from the autoconf/UNIX build section
May need a bit of proofreading; it's the first plain HTML I've edited since 1999!
It also adds a couple of tweaks:
- adds ld-version-script option to cmake build to match autoconf
(note: defaults to on to be ABI-compatible by default with all Linux
distribution builds; worth also switching the autoconf default to ON to match the distributions as well since it's disabled if unavailable?) Otherwise builds aginst custom libtiff builds won't run on most distributions due to symbol mismatches (and vice-versa).
- bumps version to 4.0.5
- drops "hyla" in the examples, since it doesn't add to the example
- adds a bit of additional context to the section headings
Regards,
Roger
? cmake-docs.patch
Index: CMakeLists.txt
=================================================================== RCS file: /cvs/maptools/cvsroot/libtiff/CMakeLists.txt,v retrieving revision 1.3
diff -u -r1.3 CMakeLists.txt
--- CMakeLists.txt 21 Aug 2015 01:59:33 -0000 1.3
+++ CMakeLists.txt 29 Aug 2015 11:26:27 -0000
@@ -153,6 +153,7 @@
set(CMAKE_DEBUG_POSTFIX "d")
endif()
+option(ld-version-script "Enable linker version script" ON)
# Check if LD supports linker scripts.
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map" "VERS_1 {
global: sym;
@@ -167,7 +168,7 @@
check_c_source_compiles("int main(void){return 0;}" HAVE_LD_VERSION_SCRIPT)
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
-if (HAVE_LD_VERSION_SCRIPT)
+if (ld-version-script AND HAVE_LD_VERSION_SCRIPT)
set(HAVE_LD_VERSION_SCRIPT TRUE)
else()
set(HAVE_LD_VERSION_SCRIPT FALSE)
Index: html/build.html
=================================================================== RCS file: /cvs/maptools/cvsroot/libtiff/html/build.html,v retrieving revision 1.16
diff -u -r1.16 build.html
--- html/build.html 21 Jun 2015 18:21:28 -0000 1.16
+++ html/build.html 29 Aug 2015 11:26:28 -0000
@@ -10,11 +10,12 @@
"images/cramps.gif" width="159" height="203" align="left" border=
"1" hspace="6"> Building the Software Distribution</font></h1>
<ul>
-<li><a href="#UNIX">Building on a UNIX system</a>.</li>
-<li><a href="#PC">Building on an MS-DOS or Windows system</a>.</li> +<li><a href="#CMAKE">Building on all systems with CMake</a>.</li> +<li><a href="#UNIX">Building on a UNIX system with Autoconf</a>.</li>
+<li><a href="#PC">Building on an MS-DOS or Windows system with nmake</a>.</li>
<li><a href="#VMS">Building on a VMS system</a>.</li>
<li><a href="#Other">Building the Software on Other
-Systems</a></li>
+Systems.</a></li>
</ul>
<br clear="left">
This chapter contains step-by-step instructions on how to configure
@@ -22,8 +23,216 @@
easily built on a UNIX system, but with a little bit of work it can
easily be built and used on other non-UNIX platforms.
<hr>
+<a name="CMake" id="CMAKE"></a>
+<h2>Building on all systems with CMake</h2> CMake may be used to +generate build files for most common build systems and IDEs, and +supports all UNIX-like systems as well as Windows. See +the <a href="http://www.cmake.org/">CMake website</a> for further +details. To build the software on you need to first run +<tt>cmake</tt> to configure the build and generate the system-specific +build files. This reads the top-level <tt>CMakeLists.txt</tt> file, +which probes the target system for necessary tools and functions, +checks any options you specified to configure the build, and then +outputs build files configured for your system. If using <tt>Unix +Makefiles</tt>, once configuration is done, you simply +run <tt>make</tt> (or <tt>gmake</tt>) to build the software and +then <tt>make install</tt> to do the installation. �B