← Back to issue list

plugins: drop cmake install prefix argument

View original Github issue

Metadata

Project
craft-parts
Number
#267
Type
pull request
State
merged
Author
cmatsuoka
Labels
Created
Updated
Closed

Current evaluation

Merged. Removed the default CMAKE_INSTALL_PREFIX from the cmake plugin to fix core22 snap compatibility. Authors must manually specify the prefix for core18 alignment, resolving binary path and library detection issues.

Suggested action:

No scores available.

Issue body

Setting `CMAKE_INSTALL_PREFIX` by default makes the cmake plugin compatible with the Snapcraft cmake plugin for core18 and solves usability issues, but it also breaks compatibility with existing core22 snaps that expect binaries to be installed in `usr/local/bin` by default. To keep compatibility with existing core22 snaps, the prefix path will not be defined by default, and snap authors are encouraged to define `-DCMAKE_INSTALL_PREFIX=` in cmake parameters to be compatible with the core18 cmake plugin, so that libraries built with cmake and staged by a different part can be correctly detected without the need to define additional parameters such as `CMAKE_INCLUDE_PATH` and `CMAKE_LIBRARY_PATH`. Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com> - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? -----

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged. Removed the default CMAKE_INSTALL_PREFIX from the cmake plugin to fix core22 snap compatibility. Authors must manually specify the prefix for core18 alignment, resolving binary path and library detection issues.
qwen3.6-35b-a3b-mtp-q6 Merged removal of the default CMAKE_INSTALL_PREFIX from the cmake plugin to restore compatibility with existing core22 snaps. Authors must manually configure the prefix for core18 compatibility, resolving snapcraft#3878.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3217 cmake v2 plugin: add stage to CMAKE_PREFIX_PATH snapcraft merged Merged changes to the cmake v2 plugin that add a stage to CMAKE_PREFIX_PATH, fixing core18 to core20 snap porting. Unit tests were updated to pytest. Approved and passed CI.
71%