diff options
author | Albert Astals Cid <albert.astals.cid@kdab.com> | 2019-02-21 14:46:22 +0100 |
---|---|---|
committer | Albert Astals Cid <albert.astals.cid@kdab.com> | 2019-02-27 15:04:59 +0000 |
commit | 31e1dda94b66581580dd92a3664d5f5773b81065 (patch) | |
tree | 6c55c9c39124ddc22c61156cf736874805e510f5 /util | |
parent | e03596c2a7d7a3d4b62c90170175fc61957776a9 (diff) |
cmake: Give the egl_x11 test the necessary libs to compile
And add the eglfs_x11 plugin
We need to actually try to compile the test as the comment it it says
that having x11 and egl is not enough since sometimes they are actually
incompatible
Change-Id: If6bdc08c21b91fa9c41663f2fa653fd59e5ddd2e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'util')
-rwxr-xr-x | util/cmake/configurejson2cmake.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py index 840ffefd05..0997608ed9 100755 --- a/util/cmake/configurejson2cmake.py +++ b/util/cmake/configurejson2cmake.py @@ -616,12 +616,12 @@ def parseTest(ctx, test, data, cm_fh): cm_fh.write("# {}\n".format(test)) if "qmake" in details: # We don't really have many so we can just enumerate them all if details["qmake"] == "unix:LIBS += -lpthread": - librariesCmakeName = format(test) + "_TEST_LIBRARIES" + librariesCmakeName = format(featureName(test)) + "_TEST_LIBRARIES" cm_fh.write("if (UNIX)\n") cm_fh.write(" set(" + librariesCmakeName + " pthread)\n") cm_fh.write("endif()\n") elif details["qmake"] == "linux: LIBS += -lpthread -lrt": - librariesCmakeName = format(test) + "_TEST_LIBRARIES" + librariesCmakeName = format(featureName(test)) + "_TEST_LIBRARIES" cm_fh.write("if (LINUX)\n") cm_fh.write(" set(" + librariesCmakeName + " pthread rt)\n") cm_fh.write("endif()\n") @@ -631,6 +631,15 @@ def parseTest(ctx, test, data, cm_fh): else: qmakeFixme = "# FIXME: qmake: {}\n".format(details["qmake"]) + if "use" in data: + if data["use"] == "egl xcb_xlib": + librariesCmakeName = format(featureName(test)) + "_TEST_LIBRARIES" + cm_fh.write("if (HAVE_EGL AND X11_XCB_FOUND AND X11_FOUND)\n") + cm_fh.write(" set(" + librariesCmakeName + " EGL::EGL X11::X11 X11::XCB)\n") + cm_fh.write("endif()\n") + else: + qmakeFixme += "# FIXME: use: {}\n".format(data["use"]) + cm_fh.write("qt_config_compile_test({}\n".format(featureName(test))) cm_fh.write(lineify("LABEL", data.get("label", ""))) if librariesCmakeName != "": @@ -639,8 +648,6 @@ def parseTest(ctx, test, data, cm_fh): cm_fh.write('"' + sourceCode + '"') if qmakeFixme != "": cm_fh.write(qmakeFixme) - if "use" in data: - cm_fh.write("# FIXME: use: {}\n".format(data["use"])) cm_fh.write(")\n\n") elif data["type"] == "x86Simd": |