Changed CMakeLists file using best practice for package dependencies