Fix cmake configuration

Hi, I have tried to fix the building using cmake. I tested this on a debian/unstable and it works. I am debian developer and I will try to upload Halide to debian. But first I would like to have a good build system configuration.

To build using cmake I am using::
    mkdir build
    cd build
    cmake -D LLVM_CONFIG=llvm-config-3.6 -D CLANG_PATH=clang-3.6 ..

Please take a look and tell me what you think
With the most recent push I can link libHalide.dylib, but fail to link other executables due to this list of libraries. Where does this list come from? If it is an LLVM dependency (like tinfo?) then we should pick it up through an llvm-config option. If it is an optional Halide dependency then we need logic in the CMake build to handle it.

Linking CXX executable ../bin/correctness_argmax
ld: library not found for -ltinfo
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bin/correctness_argmax] Error 1
make[1]: *** [test/CMakeFiles/correctness_argmax.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....