Fixing CMakeLists.txt

include directories are only set up when the dependencies are found.