summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/cmake_functions.prf
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Don't hard-code the sysroot in Qt5XXXConfigExtras.cmakeJoerg Bornemann2020-05-141-1/+8
| | | | | | | | | | | | Instead of writing the hard-coded sysroot into the .cmake file, write the variable ${CMAKE_SYSROOT}. This makes it possible to relocate the build to a machine where the sysroot is different from the build machine. Fixes: QTBUG-83335 Change-Id: Iaa69feb9a140b050f6b5547929cc940ee0f039ce Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove leading '/' from target paths.Stephen Kelly2013-11-271-2/+2
| | | | | | | | | | | | This is inappropriate on Windows, and breaks non-prefix builds there. This is only needed when we calculate a relative path from a sysroot, so only add it in that case. Task-number: QTBUG-34880 Change-Id: I0e3b3d977a7b56649e4ba0077ac574aabf1dc915 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Move the cmakeRelativePath function to cmake_functions.Stephen Kelly2013-07-241-0/+5
| | | | | | | | Task-number: QTBUG-32570 Change-Id: I05bbf7084ef8501bf17698f2ecc1cf3d8fd4d460 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* CMake: Add a clean_path before returning a path.Stephen Kelly2013-07-241-1/+1
| | | | | | | | | | | The $$path may already be absolute, so prepending a slash may result in //usr/lib, for example. Task-number: QTBUG-32570 Change-Id: If7a4f6fbec0216404cfe48c1da62d21d75b3e272 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* CMake: Fix test for value starting with -LStephen Kelly2013-06-211-1/+1
| | | | | Change-Id: I02ba45beca09c2eb1b1fbdc2a8f6efbc783bd72d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Remove the use of CMAKE_FIND_ROOT_PATH.Stephen Kelly2013-06-101-1/+1
| | | | | | | | | | | | This is actually a list in CMake, not a value to be prepended to paths. Specify the QT_SYSROOT instead to root the location of include directories. CMake will soon get a CMAKE_SYSROOT variable which will replace this. Change-Id: I239f69f127f3676a3835aa4f29638f44ef209819 Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Strip the -L dirs when processing GL dirs for the CMake files.Stephen Kelly2013-06-061-1/+1
| | | | | | | | | | | | | The generated cmake files expect only the names of libraries, so the existence of directories causes erroneous fatal errors when attempting to use Qt5Gui, if pkg-config returns a -L entry from pkg-config --libs egl Change-Id: Iec50b4be68ab643c3c02abce2435a98e69955138 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Use the CMake list separator for content in a CMake list.Stephen Kelly2013-04-231-1/+1
| | | | | | Change-Id: I664c31d256d395d4afec81de66a84dc79ed10b9d Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add IMPORTED targets for the GL libraries used by Qt.Stephen Kelly2013-04-221-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add the GL headers to cmake variables.Stephen Kelly2013-04-191-0/+9
| | | | | | | | | | | | | | If building angle ourselves, that's just the basic Qt include dir, and if using an external gl, look for it in the places specified in the mkspec. As the qopengl.h header includes the gl header, this is a 'public include dependency' of QtGui, so it is added to the relevant variable and the INTERFACE_INCLUDE_DIRECTORIES of Qt5::Gui. Change-Id: I8c2c1782e0a2600032771175444b087da28433fc Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Handle usr-move without forcing absolute pathsStephen Kelly2013-04-191-0/+7
| | | | | | | | | | | | | | | | | | In qtbase commit 7ac58d1ff0815566ba1de09519299b5119e5ee91 (Make cmake packages installed to /usr non-relocatable., 2013-02-11), we made cmake config files non-relocatable if they were installed to the /usr prefix. That was assumed to mean that this was a distro or platform package, and was a workaround for the usr-move problem on Fedora and ArchLinux. However, cmake bug http://public.kitware.com/Bug/view.php?id=14041 showed that forcing absolute paths in this situation is not desirable in cross compiling scenarios. CMake commit 6c613b433c45efb0bb013a6bd668cbb8ac740259 (Handle usr-move without forcing absolute paths (#14041), 2013-04-03) addressed the problem in CMake, and this commit is an equivalent. Change-Id: I065a6230bc618aa980fae6ca511ae10df4cd62c2 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Extract some cmake related functions for re-use.Stephen Kelly2013-02-251-0/+26
These will be used by ctest_testcase.prf. Change-Id: I8a0e6e1eb110daba41b007c8309f3cb9a2059ecb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>