Bug 377484 - CMake configure error (INTERFACE_INCLUDE_DIRECTORIES)
Summary: CMake configure error (INTERFACE_INCLUDE_DIRECTORIES)
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-networkmanager-qt
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.31.0
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-11 08:07 UTC by Andrey Ponomarenko
Modified: 2022-07-27 16:14 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Ponomarenko 2017-03-11 08:07:34 UTC
There is a CMake configure error in NetworkManagerQt 5.31.0 and 5.32.0:

  cmake .
  ...
  CMake Error in src/CMakeLists.txt:
  Target "KF5NetworkManagerQt" INTERFACE_INCLUDE_DIRECTORIES property
  contains path:

    "/tmp/Usq3jtpYBr/build/networkmanager-qt-5.31.0/src/SYSTEM"

  which is prefixed in the source directory.

This error is caused by the change of CMakeLists.txt  in 5.31.0.
Comment 1 Jan Grulich 2017-03-13 07:08:22 UTC
I don't have this error when running cmake. Also our CI is not complaining about that change. Are you sure the problem is not on your side?
Comment 2 Andrey Ponomarenko 2017-03-14 06:19:03 UTC
It's reproduced on my Fedora 21 (x86_64, CMake 3.7.0). Other libraries from the KDE Frameworks (Tier 1) are built fine.

CMake command line:

  cmake .. -DCMAKE_PREFIX_PATH='/home/Soft/Qt-5.7.1/'

This sed command fixes the issue:

  sed -i -e 's/ SYSTEM//' src/CMakeLists.txt
  sed -i -e 's/ SYSTEM PUBLIC//' src/CMakeLists.txt

Thank you.
Comment 3 Jan Grulich 2017-03-14 06:39:47 UTC
Maybe try with newer cmake? I suppose that with Fedora 21 your cmake is quite old.
Comment 4 Andreas Sturmlechner 2019-10-15 11:08:51 UTC
I'm not sure it is related, but there is something off here as well with the way nm-qt's cmake config inherits dependencies from glib: https://bugs.gentoo.org/695788

KF5::NetworkManagerQt INTERFACE_INCLUDE_DIRECTORIES ends up with the following content:
"${_IMPORT_PREFIX}/include/KF5/NetworkManagerQt;/usr/include/libnm;/usr/include/libmount;/usr/include/blkid;/usr/lib64/libffi-3.3_rc0/include;/usr/include/glib-2.0;/usr/lib64/glib-2.0/include;${_IMPORT_PREFIX}/include/KF5"

libffi presumably because of "Requires.private: libffi >=  3.0.0" in gobject-2.0.pc
Comment 5 Andreas Sturmlechner 2019-10-29 21:07:43 UTC
Nevermind, my issue comes from meson producing glib pkgconfig files that leak Requires.private into reverse deps.
Comment 6 Nicolas Fella 2022-07-27 16:14:51 UTC
The relevant CMake code changed a bit since then. Please open a new report when you are still having build issues