When the Cavaliers talked to the Knicks about Kyrie Irving, Cleveland brass had no interest in discussing Carmelo Anthony. Kristaps Porzingis was their lone focus.

Whether that changes after the blockbuster trade that sent Irving to the Celtics, with the Cavaliers emerging with more assets than anyone imagined, remains to be seen. As does whether Anthony, who has a no-trade clause, will have renewed interest in playing with LeBron James — even if it is for one season.

Anthony claims to be “at peace,’’ but he must be getting antsy after watching Irving get his wish and Paul George, Jimmy Butler and Chris Paul each get traded, too.

The Irving chaos and James’ reported wish to bolt Cleveland after the season turned Anthony’s main focus toward Houston. But the Cavaliers came out of the Irving fiasco looking more formidable than ever by adding explosive point guard Isaiah Thomas, defensive forward Jae Crowder and the rights to the Nets’ potential lottery pick next June.

The gritty Crowder can’t be traded for 60 days — until Oct. 22, but the Knicks consider him an attractive piece. Now that Cleveland has secured the Nets’ pick, under NBA rules it is permitted to trade its own 2018 first-rounder.

Also, with Phil Jackson gone, it’s not as farfetched for the Knicks to consider taking back Iman Shumpert, who had been looking at a change of scenery, too. Shumpert was the Knicks’ first-round pick in 2011. Still, many league sources believe the salary-cap mathematics for an Anthony trade still will be tough to pull off with Cleveland.

Anthony probably should be playing it year-to-year at this stage and age (33). Even if James leaves following the season, Anthony, too, has an opt-out clause after 2017-18 to perhaps follow James to Los Angeles.

While James lobbied management for an Anthony trade in-season, he seems more focused on reuniting with Dwyane Wade, who could be bought out by the Bulls soon.

The chance of Anthony being bought out anytime soon by the new Knicks front office headed by president Steve Mills is slim.

The Knicks are bracing for Anthony’s return with training camp less than five weeks away. Coach Jeff Hornacek reportedly attended one of Anthony’s recent training sessions at the Lifetime Athletic gym he owns in a midtown high-rise.

Nevertheless, if the Knicks can’t find a deal by the trade deadline in February and are out of the playoff race, some NBA insiders feel the club could be willing to buy Anthony out if they receive a substantial savings. That would include making Anthony forgo his 2018-19 option year.

If the Knicks were to waive Anthony outright in February with no buyout agreement, that final option year would count on their cap in the summer of 2018.

As a February free agent, Anthony would then have a chance to sign on with Houston or Cleveland with plenty of time to get acclimated for the playoffs.

That James is now surrounded by enough to make the Finals has to make Anthony consider putting Cleveland back on his radar screen. Unless, that is, Anthony has inside information James truly would consider the Knicks over the Lakers in 2018.