Cmake plugin failing to install to SNAPCRAFT_PART_INSTALL using core20

I’m seeing different behaviour when building an app using the cmake plugin from core18 to core20. Cmake successfully installs the build files to parts install directory when using core18, as soon as I switch to core20 the binaries will build but the files do not appear in the install directory. This results in errors when staging the part (example staging bin directory: Failed to copy ‘/root/parts/app/install/bin’: no such file or directory.).

There is no longer a DCMAKE_INSTALL_PREFIX set by default.

1 Like

Thanks @sergiusens you were right. It was installing to the default CMAKE_INSTALL_PREFIX /usr/local under the DESTDIR SNAPRAFT_PART_INSTALL. Setting cmake-parameters: ["-DCMAKE_INSTALL_PREFIX="] replicated the old behaviour.

1 Like