Install current cmake in Travis CI environment
silence some warnings
Move all CMake scripts one level up

Having them in cmake/modules/ just adds a pointless extra directory,
so let's move them directly into cmake/.
Move compile settings into a separate CMake module

That stuff just clutters the main CMakeLists.txt and is better off
in a separate file.
Enable automoc

Finally we can make use of this very convenient CMake feature and have
the moc stuff handled automagically. No need to list the headers anymore
for feeding them into the long-deprecated qt4_wrap_cpp macro.

Also, this should compile a bit faster and lead to slightly better optimized
code, because automoc will combine all the generated moc stuff for a target
into a single translation unit.

Note that we could get rid of various empty .cpp files (where all the code
is in the header) by just adding the header to the sources list; that way,
automoc will pick them up. There is no need to have a dummy .cpp file for
that.
Simplify handling of (dual-)Qt in the build system

We've used a somewhat complex way to link the various targets to the
required Qt libraries (and use the correct defines and CFLAGS...), because
when that stuff was written, there were no target properties in CMake, and
thus it was not easily possible to build targets within the same scope with
different settings. Therefore, we couldn't use the QT_USE_FILE and had to
write our own library handling.

These days, target properties exist, and Qt5 came up with a nice way to attach
the needed properties based on the Qt modules in use: qt5_use_modules()
This was later backported to Qt4, too, replacing the old way of having to
include QT_USE_FILE which would then set global variables.

We now make use of this; because qt4_use_modules() only showed up in
CMake 2.8.10, we've copied that function. It will be used only if it's
not present in CMake proper.

As a bonus, I've also wrapped all the qt-related macros into functions
that do the check for the Qt version we want to build against, and select
the proper macro to call, thus removing lots of WITH_QT5 conditionals
from the rest of the build system. Note that Qt5 support is still incomplete,
anyway.
Don't actually build miniz if we have zlib

We don't use miniz if we have zlib; but it was still being built, because
we never actually set HAVE_ZLIB as a build system variable.

Use ZLIB_FOUND instead.
Only create the regular expression for content/sender matches once.

Fixes #1227.
Merge pull request #54 from Bombe/issue-1227

Only create the regular expression for content/sender matches once.
Oops, left in some debug stuff...
Improve the CMake option stuff

We now use cmake_dependent_option() to express dependencies between
the various options that you can give to CMake for configuring Quassel;
for example, enabling KDE4 now forces some options to OFF regardless
of the user-selected value (which will, however, be preserved in case
KDE integration is disabled again later).

This also renames WITH_QT5 to USE_QT5 (and adds a USE_QT4, too); this seems
to have emerged as the standard way to select a Qt version for dual-Qt
packages. However, Qt4 is still selected by default unless you force Qt5
by setting the USE_QT5 flag. BTW, don't get your hopes up, Qt5 support is
still broken... Once it's working, we may select Qt5 as default for certain
platforms.

Additionally we renamed QT to QT_PATH to make the function of this flag
more clear.
Backtrace generation depends on the target system, not the host

We were checking for CMAKE_HOST_WIN32 and CMAKE_HOST_UNIX for determining
which kind of backtrace generation support to build. However, this should
obviously depend on the target platform, not on the platform we build on.

So let's use WIN32 and UNIX instead.
Add a CMake wrapper for finding indicate-qt

Because CMake's feature_summary works only with dependencies found
via find_package, it makes sense to have a wrapper around the
PkgConfig call used to find indicate-qt. This is very basic and does
not support all of the usual options (such as checking for a particular
version), but sufficient for our needs.
Don't make EventType::KeyEvent depend on HAVE_QCA2

This enum value can be known even if we don't have encryption support.
Remove unnecessary include

CoreApplication does not in any way depend on KApplication.
Fix finding a custom Qt4 via -DQT_PATH

This CMake option has recently been renamed from QT to QT_PATH; we
really should actually use the new name...
Completely rework the dependency handling in the build system

Traditionally, optional build dependencies are handled in CMake via
offering options and conditionally searching for the needed packages.
This leads to having lots of options, boilerplate for telling the user
which features are enabled or not, unclear handling of automagic
dependencies, and so on.

These days, CMake offers a much nicer way: feature_summary() and friends.
To make use of this, one calls find_package unconditionally and then sets
properties on the package that tell CMake if the dependency is optional
or required, its purpose, a description of the package etc. At the end
of configuration, CMake then displays a nice summary of all the packages
searched for and (not) found, as well as other features.

Quassel now makes use of this modern way of specifying dependencies, replacing
most of the former options (they're still there, but unused now, and will
be removed soon). Note that one can still disable an optional dependency Foo by
passing -DCMAKE_DISABLE_FIND_PACKAGE_Foo=TRUE to CMake.

I also took the opportunity to radically clean up and fix how we handle
dependencies throughout the build system:

* We no longer set an extra CMake variable to indicate that a package was
  found, but use the Foo_FOUND variable directly
* Compile definitions and include directories are no longer set globally
  in the root CMakeLists.txt, but in the Quassel modules where they're
  actually needed; this should speed up compiling ever so slightly and
  generally make things much cleaner
* Libraries are now linked directly to the Quassel modules that use them,
  rather than to the executable. This prepares us for making the modules
  shared libraries at some point, and is anyway The Right Thing™ to do
* Fully support Qt5 in the build system, including finding the proper version
  of dependencies where appropriate and available

Note that the changes to the build system are not complete yet, and some things
may be broken now. Note also that while Qt5 is now supported in the build system,
the code itself still requires many changes to actually compile with Qt5,
so don't even try.
Make SSL and syslog support non-configurable

Both features have no external dependencies; SSL support requires Qt
to be built with SSL support, and syslog support requires the existence
of the syslog.h header. It makes no sense to make this configurable,
as no additional libraries or other dependencies are pulled in.

Instead, just add them to the feature_summary depending on the prerequisites
being in place.
Remove obsolete CMake options

Now that the new dependency handling is in place, we can remove several
of the CMake options we used to have. If you don't want automagic
dependencies, and want to disable one even though it is installed, you
can use -DCMAKE_DISABLE_FIND_PACKAGE_Foo=TRUE for ignoring the Foo package.
Update INSTALL file

This hadn't been touched since 2007, and with all the recent build
system changes, I guess it made sense to adapt it to reality.