Ricky Gervais has joined the voice cast of “Blazing Samurai,” the animated family comedy from Mass Animation, Huayi Brothers Media Corporation, Flying Tigers Entertainment and GFM Films.

Producers are Rob Minkoff, Yair Landau and Susan Purcell. GFM is selling international rights at the American Film Market.

Sony Pictures International Releasing has already picked up several major territories worldwide. Huayi Brothers Media Corporation is distributing the film in China.

Gervais will join Samuel L. Jackson, Michael Cera, Mel Brooks, George Takei, Gabriel Iglesias, Aasif Mandvi, Djimon Hounsou, Michelle Yeoh, Sandra Tsing Loh, Mel B. and Heavenly Joy Jerkins.

“Blazing Samurai” is about a scrappy dreamer of a dog named Hank (voiced by Cera) who longs to become a great warrior and fights to save the town of Kakamucho. The film is inspired by Brooks’ “Blazing Saddles.”

Gervais will voice the villainous Ika Chu, the sneaky bad cat with a grand plan to rid Kakamucho of its feline inhabitants.

“Blazing Samurai” is directed by Chris Bailey and Mark Koetsier from a screenplay by Ed Stone and Nate Hopper. Executive producers include Brooks, Reginald Hudlin and Pietro Ventani.

The animated comedy will be released by Open Road Films in the U.S. on Aug. 4, 2017.