Buildings should cast shadows automatically in TRS19 unless there's a specific tag stating otherwise that can be used for splines, for example such as cast-shadows 0 or something like that. I can't remember the exact syntax off hand.
In the olden days, such as TRS2004 up to TS12, there were no shadows except for consists and those shadows were specified in the config.txt and required a shadow mesh. This setup, however, wouldn't work for a building or some other non-train-car or locomotive and placing that in a config.txt for a scenery item would cause an error.