We extend the cosmic no-hair theorem to a general class of scalar-tensor nonminimally coupled theories of gravity where ordinary matter is also present in the form of a perfect fluid. We give a set of conditions for obtaining an asymptotic de Sitter expansion, independently of any initial data, by a sort of time-dependent (effective) cosmological constant. Finally we apply the results to some specific models.