qt5base-lts/mkspecs/features/cmake_functions.prf
Stephen Kelly bc4fbcd215 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>
2013-04-22 18:35:52 +02:00

66 lines
1.3 KiB
Plaintext

#
# W A R N I N G
# -------------
#
# This file is not part of the Qt API. It exists purely as an
# implementation detail. It may change from version to version
# without notice, or even be removed.
#
# We mean it.
#
defineReplace(cmakeModuleName) {
_module = $$1
_name = $$eval(QT.$${_module}.name)
cmake_module_name = $$replace(_name, ^Qt, )
return ($$cmake_module_name)
}
defineReplace(cmakeModuleList) {
variable = $$1
out =
for(v, variable) {
out += $$cmakeModuleName($$v)
}
return ($$join(out, ";"))
}
defineReplace(cmakeTargetPath) {
SYSR = $$[QT_SYSROOT]
!isEmpty(SYSR): path = $$relative_path($$1, $$[QT_SYSROOT])
else: path = $$1
return(/$$path)
}
defineReplace(cmakeTargetPaths) {
variable = $$1
out =
for(v, variable) {
out += \"$$cmakeTargetPath($$v)\"
}
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, ";"))
}