  We establish asymptotic properties of $M$-estimators, defined in terms of a
contrast function and observations from a continuous-time locally stationary
process. Using the stationary approximation of the sequence, $\theta$-weak
dependence, and hereditary properties, we give sufficient conditions on the
contrast function that ensure consistency and asymptotic normality of the
$M$-estimator. As an example, we obtain consistency and asymptotic normality of
a localized least squares estimator for observations from a sequence of
time-varying L\'evy-driven Ornstein-Uhlenbeck processes. Furthermore, for a
sequence of time-varying L\'evy-driven state space models, we show consistency
of a localized Whittle estimator and an $M$-estimator that is based on a quasi
maximum likelihood contrast. Simulation studies show the applicability of the
estimation procedures.
