← 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 in canonical/craft-parts#267, dropping the CMake plugin's default CMAKE_INSTALL_PREFIX to preserve core22 usr/local/bin behavior while allowing an explicit prefix.

Resolution: closed resolved

Reason: PR #267 was approved and merged, resolving the compatibility regression while leaving snap authors able to opt into a prefix with -DCMAKE_INSTALL_PREFIX=.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed resolved Merged in canonical/craft-parts#267, dropping the CMake plugin's default CMAKE_INSTALL_PREFIX to preserve core22 usr/local/bin behavior while allowing an explicit prefix.
stealth/space-bunny-alpha — closed resolved Merged craft-parts PR #267 removed the CMake plugin's default CMAKE_INSTALL_PREFIX, preserving core22 binaries in usr/local/bin while allowing an explicit prefix.
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 work

  • Related To: snapcraft#3878 (confidence 90%)

    The author stated that the change addressed the CMake-prefix compatibility problems discussed in snapcraft/snapcraft#3878.

Related issues

Issue Project State Summary Similarity
#263 plugins: fix cmake plugin prefix craft-parts merged Merged #263 as 71b71990 (implementation 78036efe), fixing CMake prefix-path formatting and matching installation prefix behavior to v1 plugins (CRAFT-1154).
77%
#346 CMake plugin: Support installing via prefix. snapcraft closed Closed unmerged after the change was found to target CMake instead of Autotools; equivalent prefix-install support merged in snapcraft#351 via commit 72dbc3285.
72%