Skip to content

kstyle: do not enable X11 on anything that isn't Unix or macOS

Georg Gadinger requested to merge ggadinger/breeze:fix-cmake-on-macos into master

I ran into a configuration error while trying to build Breeze from git on a macOS host, looks like a recent Qt6 preparation commit changed the logic for detecting the X11Extras a bit.

This is what CMake told me before the change:

-- Found KF5: success (found suitable version "5.92.0", minimum required is "5.90") found components: Kirigami2 
CMake Warning at kstyle/CMakeLists.txt:18 (find_package):
  Found package configuration file:

    /opt/homebrew/opt/qt@5/lib/cmake/Qt5/Qt5Config.cmake

  but it set Qt5_FOUND to FALSE so package "Qt5" is considered to be NOT
  FOUND.  Reason given by package:

  Failed to find Qt5 component "X11Extras" config file at
  "/opt/homebrew/opt/qtmodulemodule@Config.cmake"
[...]
-- The following REQUIRED packages have not been found:

 * Qt5 (required version >= 5.15.0)

CMake Error at /opt/homebrew/Cellar/cmake/3.22.2/share/cmake/Modules/FeatureSummary.cmake:464 (message):
  feature_summary() Error: REQUIRED package(s) are missing, aborting CMake
  run.
Call Stack (most recent call first):
  CMakeLists.txt:73 (feature_summary)


-- Configuring incomplete, errors occurred!

Merge request reports