summaryrefslogtreecommitdiffstats
path: root/mkspecs/cmake
Commit message (Collapse)AuthorAgeFilesLines
* Properly quote all variables which are paths.Stephen Kelly2012-05-161-2/+2
| | | | | | | | This is required if Qt is installed into a directory with spaces. Change-Id: I1d6874265558d712ac98a3aef670c2934a632ab1 Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Use IF(NOT TARGET ...) before creating imported targets.Stephen Kelly2012-05-151-3/+1
| | | | | | | | | | | | | | | | | | Initially we didn't do this because someone could accidentally create another target of a conflicting name, and used a variable to store whether we have created the target already or not. That wasn't adequeate to deal with finding the package in a scope like a function, so we used a directory property. However, the directory property is not valid in the same scopes as the defined target. For example, finding a Qt module in both a directory and a subdirectory causes a conflict. As it is already unlikely that a target would be accidentally created with a name like Qt5::Core, we should simply use the IF(TARGET) form. Change-Id: If64f25d45f51edcd1edb0d4bfb5ed3bb2479bd27 Reviewed-by: David Faure <faure@kde.org>
* Use directory property instead of variable to determine target existance.Stephen Kelly2012-05-141-2/+3
| | | | | | | | | This is more resilient to calling find_package in a scope such as a function. Change-Id: I17e69a416f4aed3102fa6195d239bcf4ce0b306b Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Only find dependencies from the same Qt installation.Stephen Kelly2012-05-131-1/+5
| | | | | | | | | | | | Add a PATH to search for dependencies in the current prefix, and disable other CMake searching logic with NO_DEFAULT_PATH. A Qt installation must all be installed to the same prefix currently. If that constraint is ever relaxed, we can turn this into a hint instead. Change-Id: I633cafb7e546dbd102ac0b2ed18db260d26adc51 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add underscore to internal implementation detail variables.Stephen Kelly2012-05-101-11/+11
| | | | | | Change-Id: I4c70ed2808396931fff986fbfad5940dd39e74f6 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Include the VERSION_STRING in CMake config files.Stephen Kelly2012-05-101-0/+1
| | | | | | Change-Id: I9f0e9316241b4cb615350876b11ee263f7efd3bf Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Don't attempt to ask cmake to find the glib dependencies.Stephen Kelly2012-05-081-2/+5
| | | | | | | | Those components are not known to FindGTK2.cmake. Change-Id: I4a7fe35d7d118168c24285f3ea8f57822b2facff Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* If a dependency was not found, and we were not called with REQUIRED, we are ↵Stephen Kelly2012-04-291-0/+6
| | | | | | | | | | not found. This only works with CMake 2.8.8, but it is no harm to earlier versions. Change-Id: I62c220e4b24f951e83c23eb57d5f833de4d181c5 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Properly quote the dependencies string.Stephen Kelly2012-04-291-1/+1
| | | | | | Change-Id: I319b04cdb21860652658ee8d3e577d41a913ed5a Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Make sure different modules do not overwrite each others dependencies.Stephen Kelly2012-04-291-2/+2
| | | | | | Change-Id: I30ca05d3c692a707cfe829ad5fee099549bab540 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Forward the REQUIRED and QUIET arguments when finding dependencies.Stephen Kelly2012-04-291-1/+10
| | | | | | Change-Id: I5d7c26f12a296ac3527575149978b18c5e9a4a67 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Overwrite the LIB_DEPENDENCIES of modules.Stephen Kelly2012-03-311-2/+2
| | | | | | | | | This way if a module is found more than once, the list does not grow duplicates. Change-Id: I08e3e2a83453f45a49fe79e803a4b50d115709a3 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Ensure that the variable for the installation prefix is unique.Stephen Kelly2012-03-311-6/+6
| | | | | | | | | Using the same variable for multiple config files can lead to conflicts. Change-Id: Ie6a22618c4c2e64567874e5c7e8b278e067fedae Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Prefix the variables for debug and release types properly.Stephen Kelly2012-03-281-2/+2
| | | | | Change-Id: I346992effa997f60a4fd20055f0af81d6a084095 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* List the dependencies of Qt when creating static libraries.Stephen Kelly2012-03-051-2/+53
| | | | | | Change-Id: Ib6787f982ff962cfdf3d8a0a26989489619a57b0 Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Make the CMake files work with directory overrides.Stephen Kelly2012-02-281-5/+22
| | | | | | | | | | | | This allows us to create correct CMake config files when Qt is configured with directories outside of the prefix (which Qt allows), and also allows us to use correct values when a 'longer' relative lib directory is used such as lib/x86_64-linux-gnu. Change-Id: I6f88255a23752dc5b84cb20ce13fdeeee9d5ad51 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Use QMAKE_SUBSTITUTIONS conditionalsStephen Kelly2012-02-221-38/+38
| | | | | | | Instead of generating CMake conditionals. Change-Id: I3d987cc08666270e618222be9292558e73bc961e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Give the compile flags an EXECUTABLE_ prefix.Stephen Kelly2012-02-211-0/+4
| | | | | | | | The fPIE flag should only be used with executables. Change-Id: If799ae4a7fe2492af3aac67651659a52d365024a Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Make modules find their own dependencies.Stephen Kelly2012-01-111-0/+12
| | | | | | Change-Id: I4a7b96d33417a15d79f3932ced91bee58915c83f Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix cmake files for static builds.Stephen Kelly2011-12-231-1/+5
| | | | | | Change-Id: I3864017df6fc0daeb31b389c8883401d344730bf Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Include the extras files after defining the target.Stephen Kelly2011-12-191-8/+8
| | | | | | | | Allows the extras file to contain references to the target. Change-Id: I47332c4efcb7ba0132509a41fa3040531cd1c81f Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Use plural form for CMake variables.Stephen Kelly2011-12-061-2/+1
| | | | | Change-Id: Idc0cd360e09046a5746c9f7366c7fd4b982058fe Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Remove CMake variables which are not needed in Config files.Stephen Kelly2011-12-061-5/+1
| | | | | | Change-Id: I8f6795f1d40983af0478270f33ab1c06abe67133 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Quote the path in CMake so that spaces in paths work.Stephen Kelly2011-12-031-1/+1
| | | | | | Change-Id: Ie73a4b242ab0bf90e6f292be9a7b7913ae4273a5 Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Make the Qt5 part of the target name namespace style.Stephen Kelly2011-12-021-9/+9
| | | | | | | | As it was in Qt4 and discussed on the cmake list. Change-Id: Ide77c2525a261a5d658d7cb661010a67d3386341 Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Install CMake config files from Qt.Stephen Kelly2011-11-292-0/+73
This includes a BSD licenced file Qt5CoreMacros.cmake which is adapted from Qt4Macros.cmake in the CMake source tree. Change-Id: I54326b808795535490a0489659b351a8da72cdbb Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>