Last winter (or summer, depending on where you are in the world) I was frustrated with the lack of customization that GNOME-Nibbles had, so I made my own clone. And thinking that others might like it, I’ve been trying to use snapcraft to package it.
But when running `$ snapcraft build’ I get this output:
caleb@whistling-duck:~/projects/gladupe$ snapcraft build
Skipping pull gladupe (already ran)
cmake /root/parts/gladupe/src -DCMAKE_INSTALL_PREFIX= -B build/
CMake Error: The current CMakeCache.txt directory /root/parts/gladupe/src/CMakeCache.txt is different than the directory /home/caleb/projects/gladupe where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
Failed to run 'cmake /root/parts/gladupe/src -DCMAKE_INSTALL_PREFIX= -B build/' for 'gladupe': Exited with code 1.
Verify that the part is using the correct parameters and try again.
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.
My projects setup is:
build CMakeLists.txt data gui gui_assets.bin gui.bin quill.toml README run.sh snap src tags
caleb@whistling-duck:~/projects/gladupe$ ls build
CMakeCache.txt CMakeFiles cmake_install.cmake gladupe Makefile
caleb@whistling-duck:~/projects/gladupe$ ls src
cfgpath.h event_layer.c food.c game.c idents.h lobby.h map.c map_editor.h map_loader.c map_saver.c prefs.c reader.c render.c settings.c worm.c writer.c
cute_files.h event_layer.h food.h game.h lobby.c main.c map_editor.c map.h map_loader.h map_saver.h prefs.h reader.h render.h settings.h worm.h writer.h
A snippet of my snap/snapcraft.yaml is:
- -B build/
So, how do I edit my CMakeCache.txt file to get the desired result?
And also, how do I set libc as a dependency? If I uncomment those lines it gives me an error.
The other one is what does the -DCMAKE_INSTALL_PREFIX flag in cmake?