New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove "cd Build" from "Getting Started" instructions? #18
Comments
You should not be running CMake in the top level directory. That is known as an in-source build. After you clone the repository, you should If in doubt, please follow the instructions exactly as they appear. |
Sorry to be such a bother. I just gave it another shot following the instructions exactly as they appear (with the variation of specifying the "CodeBlocks - MinGW Makefiles" generator). I got the same results (i.e. "source directory xxx does not appear to contain CMakeLists.txt) as shown below. I can see where my original post might have been confusing since the repository root was "C:/Download/Graphics Libs/Glitter/Glitter" and therefore the "C:/Download/Graphics Libs/Glitter/Glitter/Build" folder did exist and was the folder that I was in after following the instructions. To make things a little clearer this time, I started in "C:\Users\Gary\Documents\CodeBlocksProjects" and therefore the repository root ended up being "C:\Users\Gary\Documents\CodeBlocksProjects\Glitter". The resulting error was:
Looking directly at the repository on Github, the "Glitter/Build" folder (https://github.com/Polytonic/Glitter/tree/master/Build) only contains a .gitignore file and not a CMakeLists.txt file. Am I completely missing something here?
|
You're missing cmake .. -G "CodeBlocks - MinGW Makefiles" |
Ahhh...I thought that was an ellipse indicating any other options that I might want to specify. So much for following the instructions exactly. Thanks again. |
Ah, hm. Yeah I didn't realize that could be confusing. I figure most people on Windows tend to use the standard toolchain and stop as soon as they get their project file up and running. I think you're the second person now I've talked to that uses MinGW. I might add a line for that makefile generator. Is everything working for you now? |
Yes, cmake worked as expected this time. I'm now trying to grok how to organize any projects (i.e. folder structure -> src, include etc.) created from the resulting output and how (if) I can make a template out of this without having to go through the clone/build process each time. The CodeBlocks project file ending up in the Build folder is a little counterintuitive and is throwing me off a bit. Also, I see that the paths are absolute instead of relative which complicates reuse of a specific build. Any thoughts? |
The "Build" folder is where project files and output binaries go. You don't need to maintain a separate folder structure. If you want to organize your code differently, create new folders and modify the includes/sources in At this point, I would strongly recommend that you work through a brief CMake tutorial. |
Closing this as it seems you've resolved the original issue. Feel free to reopen or file a new ticket if you continue to have issues. |
I get the following error when running cmake in the Build directory as instructed in "Getting Started":
It works fine when running it from the top-level directory. It appears that the "cd Build" step should be removed.
BTW, is the Build directory used as an interim location during the build process? I ask because I didn't see anything there either before or after building (I didn't check during the build).
The text was updated successfully, but these errors were encountered: