Macroscopic pedestrian models are theoretically simpler than microscopic models, and they can potentially be solved faster while producing reasonable predictions of crowd dynamics. Therefore, they can be very useful for applications such as large-scale simulation, real-time state estimation and crowd management. However, the numerical methods presently used to solve macroscopic pedestrian models, which are mostly grid-based, have some shortcomings that limit their applicability. More specifically, they usually include complex procedures for grid generation and remeshing, and they produce simulation results that may not be sufficiently accurate (for example, because of unclear boundaries between flow states). Smoothed Particle Hydrodynamics (SPH) constitutes an alternative numerical method that could potentially overcome these limitations. SPH is a meshfree method where a crowd is represented by a set of particles that possess material properties and move according to macroscopic laws. Relevant state variables at each particle are approximated using information about the material properties of the neighboring particles and a smoothing function. This paper puts forward for the first time a generic SPH framework for solving macroscopic pedestrian models; in addition, it demonstrates that an SPH-based simulation model can produce meaningful and accurate results by means of three case studies. The first case study shows that the proposed numerical method can approximate well the analytical solution of a simple macroscopic model applied to a queue-discharge scenario. The second case study demonstrates that the proposed numerical method can potentially reproduce density dispersion (a phenomenon observed in real crowds) more accurately than grid-based methods, due to its meshfree, Lagrangian, and particle-based nature. The third case study highlights the need to reformulate the acceleration equation of the basic macroscopic model in order to reproduce lane formation in bi-directional flows (also an observed phenomenon) using the proposed SPH framework, and this paper presents a solution to do so.