diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2013-04-16 13:38:19 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-22 18:35:52 +0200 |
commit | bc4fbcd215b72951d37db57103365963f3849fbc (patch) | |
tree | e60940386226ca4f2fed2a006b5ad1fa06f608fd /mkspecs | |
parent | d257e69a791b97a0646eb7c5a798dc3fe3db456f (diff) |
Add IMPORTED targets for the GL libraries used by Qt.
There may be multiple libraries specified in the mkspec, such as
EGL and Mali, as used in devices/linux-sh4-stmicro-ST7108-g++, so
create an imported target for each one. Also populate the
Qt5Gui_EGL_LIBS variable with all created imported targets. Similar
variables are created for the used OPENGL implementation.
In the case of using the packaged ANGLE library, we already know the
exact locations of the binaries.
This makes it possible for third parties to use the same GL
implementation as used by the Qt build itself. As these are used only
privately by QtGui, they are also added to the DEPENDENT_LIBRARIES
of that target so that they are found for rpath-link usage.
On some platforms (eg Raspberry Pi), multiple include directories must
be set to include egl.h, as the headers it includes for vcos are a
bit scattered.
Task-number: QTBUG-29132
Change-Id: I1126da3d37cd51c88d3670347c8b6405b285efb5
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/cmake_functions.prf | 23 | ||||
-rw-r--r-- | mkspecs/features/ctest_testcase.prf | 3 |
2 files changed, 26 insertions, 0 deletions
diff --git a/mkspecs/features/cmake_functions.prf b/mkspecs/features/cmake_functions.prf index 1285990206..1e7c0e23f7 100644 --- a/mkspecs/features/cmake_functions.prf +++ b/mkspecs/features/cmake_functions.prf @@ -40,3 +40,26 @@ defineReplace(cmakeTargetPaths) { } return ($$join(out, " ")) } + +defineReplace(cmakePortablePaths) { + variable = $$1 + out = + for(v, variable) { + out += ${CMAKE_FIND_ROOT_PATH}$$cmakeTargetPath($$v) + } + return ($$join(out, " ")) +} + +defineReplace(cmakeProcessLibs) { + variable = $$1 + out = + for(v, variable) { + if(!equals(v, -framework)) { + v ~= s,^-l,, + v ~= s,^-lib,, + v ~= s,.lib$,, + out += $$v + } + } + return ($$join(out, ";")) +} diff --git a/mkspecs/features/ctest_testcase.prf b/mkspecs/features/ctest_testcase.prf index 3045a21672..be972e0864 100644 --- a/mkspecs/features/ctest_testcase.prf +++ b/mkspecs/features/ctest_testcase.prf @@ -57,6 +57,8 @@ isEmpty(CMAKE_VERSION) { dependentmodules -= $$CMAKE_QT_MODULES_UNDER_TEST dependentmodules = $$cmakeModuleList($$dependentmodules) + contains(QT_CONFIG, angle): CMAKE_ANGLE_DEFINE = -DQT_WITH_ANGLE=True + CMAKE_MODULE_VERSIONS = CMAKE_MODULES_UNDER_TEST = for (MODULE_UNDER_TEST, CMAKE_QT_MODULES_UNDER_TEST) { @@ -74,6 +76,7 @@ isEmpty(CMAKE_VERSION) { cmake $$_PRO_FILE_PWD_ $$CMAKE_GENERATOR \ -DCMAKE_VERBOSE_MAKEFILE=1 \ $$CMAKE_MODULE_DEFINES \ + $$CMAKE_ANGLE_DEFINE \ -DCMAKE_BUILD_TYPE=$${CMAKE_BUILD_TYPE} \ -DCMAKE_PREFIX_PATH=$$CMAKE_PREFIX_PATH \ -DQt5_MODULE_TEST_DEPENDS=\"$${dependentmodules}\" \ |