Bug 485158

Summary: cmake 3.29.1 breaks ECM_PREFIX
Product: [Frameworks and Libraries] extra-cmake-modules Reporter: Antonio Rojas <arojas>
Component: generalAssignee: ecm-bugs-null <ecm-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 6.1.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Antonio Rojas 2024-04-06 23:18:07 UTC
In cmake 3.29.1, in particular since commit [1] , the pkg prefix variable name has changed. This breaks ECM's assumption [2] that the variable is named PACKAGE_PREFIX_DIR, and breaks setting the ECM_PREFIX variable (used, for instance, as the default CMAKE_INSTALL_PREFIX)

[1] https://gitlab.kitware.com/cmake/cmake/-/commit/6ddf8712cdcc1b548af4b502ea91e94cf0bf4f0b
[2] https://invent.kde.org/frameworks/extra-cmake-modules/-/blob/master/ECMConfig.cmake.in?ref_type=heads#L9
Comment 1 Bug Janitor Service 2024-04-06 23:30:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/437
Comment 2 Antonio Rojas 2024-04-08 10:38:29 UTC
Git commit 7e68938f075a0423e3744358be9c4e77c6922104 by Antonio Rojas.
Committed on 06/04/2024 at 23:28.
Pushed by krop into branch 'master'.

Set ECM_PREFIX at build time rather than at runtime

Since cmake commit https://gitlab.kitware.com/cmake/cmake/-/commit/6ddf8712cdcc1b548af4b502ea91e94cf0bf4f0b the package prefix variable is non-deterministic

M  +1    -1    ECMConfig.cmake.in

https://invent.kde.org/frameworks/extra-cmake-modules/-/commit/7e68938f075a0423e3744358be9c4e77c6922104