Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!

Change directory where CMake will output solution files?

  • You cannot reply to this topic
2 replies to this topic

#1 3DModelerMan   Members   -  Reputation: 1020


Posted 09 June 2013 - 12:45 PM

I've been searching everywhere and can't find an answer to this question. How can I change where CMake will output the solution files? It just puts them right in the directory that I run CMake from. I want them to go in a projects folder instead.


#2 AllEightUp   Moderators   -  Reputation: 4235


Posted 09 June 2013 - 11:31 PM

This is quite simple, just a bit odd.  CMake doesn't have an "output directory' flag, it just outputs to where ever it is run from.  So, if you wish to output to "base/build" directory, you put your CMake list file in the "base" directory, mkdir the 'build' directory and CD into it.  Then just type "cmake ../" and it will read the list file from the base directory and put all it's output in the current directory which is the 'build' directory.  Hope that makes sense, bit sauced right now..  If you need more clarification let me know. :)

#3 3DModelerMan   Members   -  Reputation: 1020


Posted 10 June 2013 - 08:00 AM

Okay. I get it. CMake just outputs wherever it's run from, that's kinda weird. Thanks it's working now.