I’ve found that the source-subdir is not being used when I attempt a core20 build. I’m running “snapcraft --use-lxd”, snapcraft 4.0.3, lxd 4.1, running on Ubuntu 20.04.
Here’s the relevant configuration, which works for core18:
name: projname
base: core18
parts:
projname:
source: https://github.com/electricworry/projname.git
source-subdir: subdir
source-depth: 1
plugin: cmake
This output shows the subdir is being hit correctly:
Building projname
cmake /root/parts/projname/src/subdir -DCMAKE_INSTALL_PREFIX=
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
CMake 3.13.2 or higher is required. You are running version 3.10.2
If I change the base to core20 the build fails, unable to find CMakeLists.txt:
Building projname
+ cmake /root/parts/projname/src
CMake Error: The source directory "/root/parts/projname/src" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Failed to build 'projname'.
Any ideas about what I can do? Is this likely to be an issue with snapcraft or the core20 image?