FOX’s Glee—the breakout TV show that centers around a high-school performance club—and ABC’s Modern Family (which includes a gay couple among its main characters) were among those receiving Emmy nominations. Sofia Vergara (of “Family”) and Joel McHale (of Community) announced the nominations July 8.

Glee led all TV programs with 19 nominations, with AMC’s ’60s show Mad Men a close second with 17 nods.

The nominees for Outstanding Drama Series are True Blood, Breaking Bad, Dexter, Lost, Mad Men and The Good Wife. Glee and Modern Family will compete for the Outstanding Comedy Series Emmy along with Curb Your Enthusiasm, 30 Rock, The Office and Nurse Jackie.

Lesbian actress Jane Lynch received an Outstanding Supporting Actress in a Comedy Series nomination for her role as Sue Sylvester on Glee. Among her competitors are Vergara and 30 Rock’s Jane Krakowski. Sharon Gless received a nod for Outstanding Supporting Actress In A Drama Series for her role in USA’s Burn Notice; among the other nominees in the category are The Good Wife’s Christine Baranski and Mad Men’s Elisabeth Moss and Peggy Olson.

Also, Sir Ian McKellen received a nod in the Outstanding Lead Actor In A Miniseries Or A Movie category for his role in Two. His competition includes Jeff Bridges, Michael Sheen, Dennis Quaid and Al Pacino.

A Gay and Lesbian Alliance Against Defamation (GLAAD) press release congratulated other openly gay and lesbian actors, including Chris Colfer (Glee), Alan Cumming (The Good Wife), Neil Patrick Harris (How I Met Your Mother; Glee), Jesse Tyler Ferguson (Modern Family) and Lily Tomlin (Damages). Wanda Sykes received a nod for her HBO comedy special, Wanda Sykes: I’ma Be Me. In addition, heterosexual actors Eric Stonestreet and Will Arness were nominated for gay roles in, respectively, Modern Family and 30 Rock.

Also, openly gay directors Paris Barclay and Ryan Murphy received nominations.

An intriguing development occurred when the Tonight Show with Conan O’Brien received a nomination but the Tonight Show with Jay Leno did not.

The awards show will air on NBC Aug. 29.

Tagged: