Added CMake support à la https://gitorious.org/libdai/libdai/commits/5a6703ee94a3fbd4e4f0e400e9491d82ebc6ac52