Changed CMake abit to better capture dependencies