If you don't have the latest version of CMake, download it from http://www.cmake.org/cmake/resources/software.html and install it. Make sure other CMake versions are removed from your system.
	tar -xzf cmake-<version>.tar.gz
	cd cmake-<version>
	./configure
	sudo make install

Use the following commands to compile and install Hiawatha. This will install Hiawatha in /usr/local.
	mkdir build
	cd build
	cmake ..
	sudo make install/strip

The following options for cmake are available. Default value is in uppercase.
	-DENABLE_CACHE=ON|off              Enable cache support in Hiawatha.
	-DENABLE_CHROOT=on|OFF             Enable chroot support in Hiawatha.
	-DENABLE_COMMAND=on|OFF            Enable the CommandChannel in Hiawatha.
	-DENABLE_DEBUG=on|OFF              Enable debug information (for development only).
	-DENABLE_IPV6=ON|off               Enable IPv6 support in Hiawatha.
	-DENABLE_MONITOR=on|OFF            Enable support for the Hiawatha Monitor.
	-DENABLE_SSL=ON|off                Enable SSL (PolarSSL) support in Hiawatha.
	-DENABLE_TOOLKIT=ON|off            Enable the URL toolkit in Hiawatha.
	-DENABLE_XSLT=ON|off               Enable XSLT support in Hiawatha.

The following path settings are available for cmake.
	-DCMAKE_INSTALL_PREFIX=<path>      The prefix for all other CMAKE_INSTALL directories.
	-DCMAKE_INSTALL_BINDIR=<path>      Location of the ssi-cgi binary.
	-DCMAKE_INSTALL_SBINDIR=<path>     Location of the other Hiawatha binaries.
	-DCMAKE_INSTALL_SYSCONFDIR=<path>  The configuration files will be installed in <path>/hiawatha.
	-DCMAKE_INSTALL_LIBDIR=<path>      The PolarSSL shared library will be installed in <path>/hiawatha.
	-DCMAKE_INSTALL_MANDIR=<path>      Manual pages will be installed in <path>/man1.
	-DCONFIG_DIR=<path>                Location of the Hiawatha configuration files.
	-DLOG_DIR=<path>                   Log directory used in the default hiawatha.conf.
	-DPID_DIR=<path>                   Location of the Hiawatha and php-fcgi PID files.
	-DWEBROOT_DIR=<path>               Webroot directory used in the default hiawatha.conf.
	-DWORK_DIR=<path>                  Path of directory where Hiawatha can write temporary files.

Look inside the directory 'extra' for scripts to build packages for Debian, MacOS X and Windows (via Cygwin).
