New Knicks general manager Scott Perry believes New York will be a destination for top free agents in the near future. But he might have to wait a while before he can compete for the best players on the open market.

Here's why:

The Carmelo Anthony trade with the Oklahoma City Thunder didn't free up much cash for New York this summer.

They sent out Anthony's $26.2 million salary and got back Enes Kanter, who has an $18.6 million player option for 2018-19, and Doug McDermott, who is in the final year of his rookie contract.

Assuming Kanter, Ron Baker and Kyle O'Quinn all exercise their player options for 2018-19, the Knicks will have $91 million in guaranteed contracts heading into July.

That would leave them with around $10 million in cap space (the 2018 salary cap is projected at $101 million). But that number doesn't factor in the salary for their 2018 draft pick or McDermott's $9.8 million free-agent cap hold. The specific salary for a first-round pick depends on where he is selected. But for reference, Frank Ntilikina, selected eighth by the Knicks in the 2017 NBA draft, has a first-year salary of $3.5 million.

For the purpose of this exercise, let's say the Knicks select eighth again.

That would leave them with $94.5 million in salary -- or less than $7 million in cap space.

That number assumes, however, that they renounce the rights to McDermott.

New York general manager Scott Perry will have to get creative to rebuild the Knicks. Brad Penner/USA TODAY Sports

The Knicks can sign McDermott to a rookie-scale extension prior to Monday, but it's unlikely they will make him an offer, league sources told ESPN. It seems that the club prefers to take the season to evaluate if and how McDermott fits into its future.

Let's also assume for the purpose of this exercise that they renounce their rights to McDermott to create cap space. If they did that, but decided against renouncing their rights to Mindaugas Kuzminskas ($4 million cap hold), the Knicks would have less than $3 million in cap space in the summer of 2018.

New York, however, would still be over the salary cap when you factor in the $8.5 million midlevel exception and $3.3 million biannual exception.

In order to use cap space in that scenario, New York would have to renounce both exceptions, something that's unlikely, based on the small amount of room available. They would be better off using their exceptions to sign players this summer, instead of the approximately $3 million in cap space.

Things could open up for the Knicks in the summer of 2019. Editor's Picks NBA draft assets for all 30 teams

NBA mock draft: New lottery picks for Cavs, Bulls, Knicks

NBA mock draft: Top 2019 prospects, new lottery odds 2 Related

New York currently has $50 million in guaranteed salaries for the 2019-20 season.

If Kristaps Porzingis signs a rookie extension this summer that starts at 25 percent of the salary cap, you can add $27 million in salary to that number. Because Porzingis' free-agent cap hold is $17.1 million, New York might be better off waiting until the summer of 2019 to offer a new contract. A rookie extension in the summer of 2018 would cost the Knicks $10 million in cap space.

You also can add the $4.8 million option for Ntilikina, and the $1.6 million team options for Damyean Dotson and Willy Hernangomez. Include those and the total, including a Porzingis extension, rises to $85 million, which is $23 million below the expected cap. But the Knicks also own their 2019 first-round draft pick, so for the purposes of this exercise, let's add in $3.5 million for that player's 2019-20 salary.

That would leave the Knicks with $19.5 million in cap space (not including cap holds for empty roster spots).

The unknowns for the 2019 summer are Ron Baker's qualifying offer ($5.7 million) and Lance Thomas' $7.5 million non-guaranteed contract. Thomas' contract would be guaranteed at $1 million if he is not waived by June 30, 2019. If both of those numbers remain on the Knicks' books, then the Knicks' cap space falls to just $3.3 million (including a Porzingis extension).

Of course, New York could theoretically increase its cap space for this summer or the summer of 2019 in a trade.

Trading Kanter this season could create space; Kanter has the $18.6 million player option for next summer. The Knicks also could move Joakim Noah, Courtney Lee and Thomas -- all of whom are under contract for the next three seasons. Noah is owed $55 million over the next three seasons; Lee is owed $36.6 in that span; and Thomas is owed $21.3 million. So the contracts might be difficult to trade, particularly because only eight teams project to have room next summer.

For what it's worth, people who have spoken to members of the Knicks' front office lately have come away with the impression that the club would be open to trading Lee for the right return. On the Noah front, the Knicks -- under Phil Jackson -- asked teams if they would take Noah in a deal in most of the conversations they had about potential Porzingis trades during the spring and summer, according to sources. So that tells you about their willingness to move Noah in trade, but people around the league see Noah's contract as close to untradable as they get.

Waiving Noah via the stretch provision would save New York $11 million in cap room in 2018-19. But the Knicks also would have a $7.5 million cap hit in years three to five, when the deal would be off of their books if they let it expire. That's not ideal.

The Knicks acquired Doug McDermott in the Carmelo Anthony trade, but they will likely take a wait-and-see approach instead of extending him before the season. Ned Dishman/NBAE/Getty

Would the Knicks trade Thomas or O'Quinn, since they have a surplus of centers?

That's unknown. But it's worth noting that teams have expressed interest in O'Quinn and Thomas in the weeks leading up to the preseason, per league sources.

If the Knicks don't make a trade to create cap space in the next two summers, the club might have to wait until the summer of 2020 to make an impact in free agency. The way things are going, that might be the earliest that the club becomes attractive to top-flight free agents anyway.

In the meantime, New York has all of its first-round draft picks going forward. You can thank ex-team president Jackson for that. Jackson, according to league sources, was steadfast in his belief that the Knicks shouldn't trade future first-round picks. Since the 2018 draft is projected to be stacked at the top -- and this is the last year before the NBA implements new rules with deflated lottery odds for the very worst teams -- there may not be a better time for New York to tank.

So Perry and team president Steve Mills will have the opportunity to rebuild with young talent through the draft and, potentially, via trade. They just might have to wait a few years before they can make an impact on the free-agent market.