Comments (8)
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 cd Glitter
. You should now be in the repository root. Now cd Build
again, and then cmake ..
to create the makefiles or project files. Do not go to {Project Root}/Glitter/Build
(that folder does not exist). If for whatever reason you need a clean start, you can then delete and recreate the build folder, and rerun cmake. This is known as an out-of-source build.
If in doubt, please follow the instructions exactly as they appear.
from glitter.
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:
CMake Error: The source directory "C:/Users/Gary/Documents/CodeBlocksProjects/Glitter/Build" does not appear to contain CMakeLists.txt.
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?
C:\Users\Gary\Documents\CodeBlocksProjects>git clone --recursive https://github.com/Polytonic/Glitter
Cloning into 'Glitter'...
remote: Counting objects: 183, done.
.
.
.
Checking connectivity... done.
Submodule path 'Glitter/Vendor/stb': checked out 'c4082cfb890946a0c37df6b4c97f57b52042969e'
C:\Users\Gary\Documents\CodeBlocksProjects>cd Glitter
C:\Users\Gary\Documents\CodeBlocksProjects\Glitter>cd Build
C:\Users\Gary\Documents\CodeBlocksProjects\Glitter\Build>cmake -G "CodeBlocks - MinGW Makefiles"
CMake Error: The source directory "C:/Users/Gary/Documents/CodeBlocksProjects/Glitter/Build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
C:\Users\Gary\Documents\CodeBlocksProjects\Glitter\Build>
from glitter.
You're missing ..
when invoking CMake. You need to tell it where to find the CMakeLists.txt
file, which in this case, is located in the parent directory.
cmake .. -G "CodeBlocks - MinGW Makefiles"
from glitter.
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.
from glitter.
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?
from glitter.
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?
from glitter.
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 CMakeLists.txt
as needed. Edit the source code in Glitter/Sources
and Glitter/Headers
and make
to compile ...
At this point, I would strongly recommend that you work through a brief CMake tutorial.
from glitter.
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.
from glitter.
Related Issues (20)
- build error on mac 10.15.2 -error: argument value 10880 is outside the valid range [0, 255] HOT 4
- How to resuse the Glitter project setting? HOT 1
- Nothing displays when run on MacOS
- Where can I find this fbx? HOT 1
- How to build as library? HOT 3
- XCode project not found stbi_load function HOT 4
- Feature request: add imgui HOT 1
- Warnings on Arch Linux HOT 1
- stbi load not working on macOS, linker problems HOT 4
- CMake Error: does not contain a CMakeLists.txt file HOT 2
- Makefile:4: *** missing separator. Stop. HOT 2
- Support for WSL2 in Windows? HOT 1
- Hi there! Could you provide some more details on which Mac you're building on, which version of Xcode you're using, and the build output produced when your build fails? HOT 1
- Does not have a folder to add textures
- Add FreeType HOT 1
- Call to 'abs' is ambiguous. Hash.h HOT 5
- ld: library not found for -lminizip HOT 4
- [Tip] Solution to "Implicit conversion loses integer precision" error on macos 13+ and xcode 14+ HOT 1
- assimp build error on ARCH
- Can't load/open image files HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glitter.