From 160184d6a5d0b89d9b885581f2d93a5650eede0a Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 24 Feb 2020 14:24:25 +0100 Subject: CMake: Fix X11 and xkb library usage in the platform projects This is a prerequisite for building the bundled 3rd party libraries. Because the feature evaluation will be moved into src/CMakeLists.txt, some of the X11 packages were found in the src dir, and then a second time inside the x11-related projects. These qt_find_package calls in the x11 related projects tried to promote the imported targets to global, which failed, because they were created in a different directory scope. To avoid this, the special case qt_find_package calls are removed from the nested projects. Also, fix the mapping of some of the x11 libraries to be correct - xkbcommon_x11 was incorrectly mapped to XKB::XKB instead of the xkb common x11 library - xlib was mapped to xcb, whereas X11 is the correct CMake target Change-Id: I30781b2ecbdd478c98419b14baa0492037e49c61 Reviewed-by: Leander Beernaert Reviewed-by: Simon Hausmann --- util/cmake/helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util') diff --git a/util/cmake/helper.py b/util/cmake/helper.py index 6bd54b5534..b5f38617b1 100644 --- a/util/cmake/helper.py +++ b/util/cmake/helper.py @@ -528,9 +528,9 @@ _library_map = [ LibraryMapping("xcb_xlib", "X11_XCB", "X11::XCB"), LibraryMapping("xcomposite", "XComposite", "PkgConfig::XComposite"), LibraryMapping("xkbcommon_evdev", "XKB", "XKB::XKB", extra=["0.4.1"]), # see also xkbcommon - LibraryMapping("xkbcommon_x11", "XKB", "XKB::XKB", extra=["0.4.1"]), # see also xkbcommon + LibraryMapping("xkbcommon_x11", "XKB_COMMON_X11", "PkgConfig::XKB_COMMON_X11", extra=["0.4.1"]), LibraryMapping("xkbcommon", "XKB", "XKB::XKB", extra=["0.4.1"]), - LibraryMapping("xlib", "X11", "X11::XCB"), # FIXME: Is this correct? + LibraryMapping("xlib", "X11", "X11::X11"), LibraryMapping("xrender", "XRender", "PkgConfig::XRender"), LibraryMapping("zlib", "ZLIB", "ZLIB::ZLIB", extra=["REQUIRED"]), LibraryMapping("zstd", "ZSTD", "ZSTD::ZSTD"), -- cgit v1.2.3