Fourth of July fireworks have come and gone, and that means one thing: A swanky Idaho resort is gearing up to host an annual “billionaires summer camp.”

Allen & Co.’s yearly shindig in Sun Valley is set to kick off Tuesday, luring a slew of A-list media moguls and tech tycoons for yet another round of dealmaking that could help shape the industry landscape in the coming year.

As per usual, Jeff Bezos, Mark Zuckerberg, Bill Gates and Warren Buffett are slated to attend. Ditto for Apple Chief Executive Tim Cook and Disney boss Bob Iger.

And as per usual, all of them will be spotted casually strolling the grounds of the resort, sometimes to grab an ice cream cone — but more often locked in deep conversation about a potential merger or acquisition.

“There are two narratives. One is who is going to get eaten up?” said one exec who’s slated to attend this week.

The other, the deal-minded mogul says, is that “the value of a company is being defined by great IP,” referring to intellectual property, whether it’s a brand, a TV franchise or an archive of movies.

“Those who don’t own their own IP aren’t going to make it,” the exec added.

In other cases — particularly in media — companies may be forced to eat or be eaten simply because they aren’t big enough to survive on their own. CBS and Viacom may be a case in point — and Shari Redstone will be on site to push that point, according to a list of 90 attendees obtained by The Post.

The daughter of the aging, incapacitated billionaire Sumner Redstone controls the boards of both companies and has already set merger talks in motion, according to sources.

Still, insiders say the media heiress has explored merging CBS and Viacom with a third, fourth or even fifth media company. Possible targets range from Discovery Communications to Take-Two Interactive.

“In the end, the real change from last year is that everyone that we thought was big recognized in the last year that they aren’t big enough,” said another media exec. “They all need to develop or acquire more content.”

And yes — that also applies to Apple, Facebook, Amazon, Netflix, Google and Disney, all of which are in a content race. The winners will need to acquire and own their content on a global basis.

Some major deals that germinated at Sun Valley include Verizon’s purchase of Yahoo for $4.8 billion and Bezos’ acquisition of the Washington Post for $250 million.

Other moguls slated to attend include IAC’s Barry Diller and his wife, designer Diane Von Furstenberg; CBS’ Gayle King; former Dreamworks boss and Quibi CEO Jeffrey Katzenberg; and Imagine Entertainment co-founder Brian Grazer.

Netflix CEO Reed Hastings and Chief Creative Officer Ted Sarandos will be sitting this year out due to scheduling conflicts, according to a company spokesman.

From the sports world, attendees include NFL Commissioner Roger Goodell, MLB Commissioner Rob Manfred and NBA Commissioner Adam Silver. Patriots owner Bob Kraft, a longtime regular, will be sitting out this year’s Sun Valley in the wake of allegations he solicited prostitution at a Florida massage parlor. Kraft has denied the allegations.