libgit2/libgit2 — pull request #1162 by scunz (2012-12-19 02:54:56+00:00)
Title: RFC: Some cleanups/features in CMakeLists.txt

I've done a few cleanups in the CMakeLists.txt file, because it contains a lot of duplication, out-dated stuff - and in general becomes more and more unreadable as time goes by. I'd like to have some feedback on this.

Changes are:
- Move all user-tweakable things to the top of the file, so they can be easier spotted.
- Try to explicitly state what implications the `STDCALL` - `/Gz` thingy brings (hopefully without revealing my personal opinon on that topic once more :innocent: )
- `src/compat` isn't a directory we have anymore in the source tree. Don't scan for it.
- Remove some duplication (Though there is still more)

And 2 new features:
- Scan for zlib on windows, too. This allows the user to give CMake a `-DZLIB_LIBRARIES=-l/foo/bar -DZLIB_INCLUDE_DIRS=/where/it/dwells` to circumvent our zlib-copy to get included if there is already another instance in the project.
- Teach CMake to group files in Visual Studio projects. It's a bit hard to navigate in the clar-tests when there are up to 5 files with the same name in just a flat list.