Knicks president Phil Jackson said last week Carmelo Anthony “just as soon” prefers to stay a Knick. Reportedly, he would just as soon be LeBron James’ running mate with the Cavaliers.

An ESPN report stated Tuesday that Anthony’s agents have approached the Knicks about getting waived via a buyout in order to sign as a free agent with the Cavaliers, and got rebuffed.

It is hardly a secret James would love Anthony on the roster. Nevertheless, the mixed messages coming from the Anthony camp is confusing. The same report stated Anthony’s preference is to remain a Knick — which corresponds to what Jackson said. But the allure of James and his former Knicks buddies J.R. Smith and Iman Shumpert have become enticing.

A source confirmed the Knicks are aware Anthony prefers getting released rather than agreeing to a trade, even if he would lose a trade-kicker bonus. Anthony understands the Cavaliers don’t have the assets to make a deal for him, and this way he can add depth to the Eastern Conference champions without taking away a major piece such as Kevin Love, who is being dangled for Paul George.

According to a source, Jackson’s stance is he will not give up Anthony without gaining an asset or two and remains determined to find a trade partner. After all, Anthony, 33, is just a few months older than James.

Nevertheless, that could change now that Jackson and the Knicks are expected to part ways, according to multiple reports.

The Knicks have not entirely ruled out the stretch provision with Anthony, which would give them an extra $15.4 million in cap space in spreading his $54.1 million contract over five years.

But the Knicks, according to a source, would consider that maneuver only as “an asset’’ if it means the extra cap savings definitively would net them a star player.

“That’s unlikely,’’ the source said.

Otherwise, the cap space is an abstract asset in their eyes, not to mention Anthony would be on the books for five years in the stretch scenario.

Jackson desperately is trying to rebuild and develop young players. One last-resort option is to try to play Anthony off the bench and give larger roles to the younger players.

Anthony is going through a separation from his wife, La La. The issue of being away from his 10-year-old son, Kiyan, came up on a talk show Tuesday. La La indicated he very well may be elsewhere but hopefully close by.

“The most important thing with that is just to stay close to Kiyan,” La La said on “The Wendy Williams Show.”

“That’s my priority, that’s his priority. So wherever he ends up, of course we want him to be happy.”

The Anthony stalemate, along with the Kristaps Porzingis cold war, Derrick Rose’s uncertain future and a modicum of cap space entering Saturday’s free-agency period has left the franchise in a chaotic state — even for the Knicks.

The brass, coaches and the summer-league team hit Orlando on Wednesday for its first practice. Last July, when the Knicks came to the franchise summer league, optimism abounded.

Fresh off the Rose blockbuster, Jackson met with Joakim Noah and Courtney Lee in Disney City and signed them to lucrative deals. Porzingis visited Orlando practice site to meet new coach Jeff Hornacek, hugging him in the hallway and was positively glowing.

One year later, nobody knows which way is up, and Anthony doesn’t seem certain if he wants to be a Knick or Cavalier.