diff options
author | Cristian Adam <cristian.adam@qt.io> | 2020-11-19 19:49:46 +0100 |
---|---|---|
committer | Cristian Adam <cristian.adam@qt.io> | 2020-11-19 20:05:35 +0100 |
commit | 112d4887a3b33b63826aad7b5d9dbe876c462146 (patch) | |
tree | 4c9391fd3215e9ff68e1f8a87de8c578c18fc38a /cmake | |
parent | f077915114a7f709d451f2cd27d18eb004dd6c2b (diff) | |
download | qtwayland-112d4887a3b33b63826aad7b5d9dbe876c462146.tar.gz |
CMake: Fix Waylandkms and XComposite CMake find packages
The packages were including FindPkgConfig.cmake directly instead
of calling find_package(PkgConfig), which was causing these warnings.
Fixes: QTBUG-88539
Change-Id: Ib2947b26df1abdb5c45883f89dc51fbece0b9f20
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindWaylandkms.cmake | 7 | ||||
-rw-r--r-- | cmake/FindXComposite.cmake | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/cmake/FindWaylandkms.cmake b/cmake/FindWaylandkms.cmake index 136e70f8..5eba3a04 100644 --- a/cmake/FindWaylandkms.cmake +++ b/cmake/FindWaylandkms.cmake @@ -1,4 +1,9 @@ -include(FindPkgConfig) +if (TARGET PkgConfig::Waylandkms) + set(Waylandkms_FOUND 1) + return() +endif() + +find_package(PkgConfig QUIET) pkg_check_modules(Waylandkms wayland-kms IMPORTED_TARGET) diff --git a/cmake/FindXComposite.cmake b/cmake/FindXComposite.cmake index 0be52279..0111bb03 100644 --- a/cmake/FindXComposite.cmake +++ b/cmake/FindXComposite.cmake @@ -1,4 +1,9 @@ -include(FindPkgConfig) +if (TARGET PkgConfig::XComposite) + set(XComposite_FOUND 1) + return() +endif() + +find_package(PkgConfig QUIET) pkg_check_modules(XComposite xcomposite IMPORTED_TARGET) |