Backport cmake 3.29 compatibility fix

Bug #2065090 reported by Martin Hostettler
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
extra-cmake-modules (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Please backport

https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/431

Since cmake 3.29 entered oracular-proposed, the files created by ECMAddQch.cmake and
shipped in -dev packages cause warnings or errors (with CMP0160 set
to NEW).

Furthermore when libraries that use ECMAddQch are consumed in packages
build using meson, the build fails as the meson cmake compat code
always sets cmake_minimum_required to the current cmake version and
thus CMP0160 is always set to NEW which makes the code generated
before the fix an hard error.

Debian fixed this in #1069972 by updating to 6.1.0, but the linked upstream merge request also has a backport for the kf5 branch (also tagged as v5.116.0-rc1) if that is the preferred fix.

For example the package chr (newly synced in oracular-proposed/universe) now no longer builds in oracular-proposed because of
this (in combination with ksyntax-highlighting).

-- Configuring incomplete, errors occurred!
ERR:
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/KF5SyntaxHighlighting/KF5SyntaxHighlightingQchTargets.cmake:6 (set_target_properties):
  IMPORTED property is read-only for target("KF5SyntaxHighlighting_QCH")
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/KF5SyntaxHighlighting/KF5SyntaxHighlightingConfig.cmake:42 (include)
  CMakeLists.txt:20 (find_package)

(for a full log see https://launchpadlibrarian.net/728387461/buildlog_ubuntu-oracular-amd64.chr_0.1.78-1_BUILDING.txt.gz )

Regards,
 - Martin

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in extra-cmake-modules (Ubuntu):
status: New → Confirmed
Revision history for this message
Jose Manuel Santamaria Lema (panfaust) wrote :

Hi Martin,

thank you very much for the bug report. I think this should be fixed with frameworks 5.116, recently uploaded.

Let us know if there's still any issue.

Changed in extra-cmake-modules (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.