added options to cmakelist, added libdai

added options to cmakelist, added libdai