summaryrefslogtreecommitdiffstats
path: root/src/corelib/Qt5CoreMacros.cmake
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Allow specifying a TARGET in invocations of macros.Stephen Kelly2013-08-211-29/+51
| | | | | | | | | | | | Forward-port of 9ce60ff509c4ff27fe861fc5b2080f50897a68c4 (Qt4Macros: Allow specifying a TARGET in invokations of macros., 2013-02-26) from cmake.git. This causes the INCLUDE_DIRECTORIES and COMPILE_DEFINITIONS to be used from the specified target when running moc. Change-Id: I868a35ade3c6b059e64d226291cf2046709d86d4 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Mark qt5_use_modules as obsolete.Stephen Kelly2013-07-311-0/+12
| | | | | | | | | | Forward-port of cb7f32f5b861fe115fa71f64500a5cbb0b643f1b (Mark qt4_use_modules and qt4_automoc as obsolete., 2013-07-04) from cmake.git. Change-Id: I0c24408ef06bc93eb0e55108cf4eab2f8cbd19cb Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Define QT_NO_DEBUG with RelWithDebInfo and MinSizeRel builds.Stephen Kelly2013-07-151-0/+2
| | | | | | | | Task-number: QTBUG-32403 Change-Id: I709ca32ca5bc1a342593357735ef3911ef849eb9 Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Make qt5_use_modules find dependents only in the parent directory.Stephen Kelly2013-04-111-1/+2
| | | | | | | | | Similar to 70420ec3 (Look for cmake package dependents only in the parent directory., 2013-04-02), make sure this cmake function only searches for sibling packages as dependencies. Change-Id: Icab23d333fa6a750ee262b592fae39f0ba334fee Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Don't calculate the install prefix again in the extra cmake files.Stephen Kelly2013-02-131-1/+1
| | | | | | | | The parent file has already set a variable for it. Change-Id: I90ddda355a580f44ea7e1e44cc7df717fa0a8b7b Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* CMake: Make qt5_use_modules a macro, not a function.Stephen Kelly2012-10-221-8/+8
| | | | | | | | | | | | | | | | | | Because qt5_use_modules is a function that does a find package which finds imported targets, things like this: qt5_use_modules(foo Sql) if (TARGET Qt5::Sql) message("Qt5Sql_FOUND: ${Qt5Sql_FOUND}") endif() will show Qt5Sql as being not found, even though the target is in scope. Fix that by making it a macro instead. Change-Id: If314bd5b4d3f769c6c7df5ff2c924eabd16dcc0e Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* CMake: Improve QT5_GET_MOC_FLAGS macroStephen Kelly2012-10-041-0/+4
| | | | | | | | | | | | We need to handle CMAKE_INCLUDE_CURRENT_DIR for include directories. Otherwise generated files located in the current binary directory are not found as expected. e.g. *.json file as meta data for Qt5's plugins generated at build time. Change-Id: I14ae1e7013f9d8b485aa990d50db4a03ca4f4b81 Reviewed-by: Yuchen Deng <loaden@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* CMake: Change suffix from "cxx" to "cpp" for generate sourcesYuchen Deng2012-09-271-2/+2
| | | | | | | | | Cause Qt5's source file use "cpp" as suffix and automoc use "cpp" as suffix too. Keep it with same feel better. Change-Id: Iba3f8ffb5c3dbf003a9e1aacf3706089c1b6765c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* cmake: define QT_NO_DEBUG in client release buildsPeter Kümmel2012-08-271-0/+1
| | | | | Change-Id: Ife224bf908c5e9bc1e62a830a3750de88a082eb7 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add some error checking to the qt5_use_modules function.Stephen Kelly2012-08-271-0/+8
| | | | | | Change-Id: I8fa2f10edbee1080646324c0689b23eda44aa75d Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Require CMake 2.8.9 for the qt5_use_modules function.Stephen Kelly2012-08-101-14/+1
| | | | | | | | | | | The newer CMake version has the POSITION_INDEPENDENT_CODE property which is what we need here. The CMake 2.8.8 implementation uses awkward and incomplete string manipulation which I don't want to maintain for any amount of time when Qt 5.0 is released. Change-Id: If7ace9c6925ccdbf800f1863fa2368e55fa44d7f Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Create IMPORTED CMake targets for executables.Stephen Kelly2012-07-251-3/+3
| | | | | | | | | | | Although IMPORTED executables are not extra special, this is more future-proof in terms of both future CMake features and future our needs - it is possible that we would want to add a property to an executable at TARGET scope, which would not be possible if it is just a path. Change-Id: I649c601e004b21603c5fa97de0b7c397813ed68d Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Forward-port change to QT4_ADD_RESOURCES macro for missing rcc files.Stephen Kelly2012-06-231-16/+24
| | | | | | | | Forward-port of commit 9ce67d30011db4528d3d0bbee36412e13cfb80cc in cmake.git. Change-Id: I2d6c14f68f1630fc0835b3103e5058f52c2d0d13 Reviewed-by: David Faure <faure@kde.org>
* Use the POSITION_INDEPENDENT_CODE property on targets using Qt.Stephen Kelly2012-06-201-10/+15
| | | | | | | | | This property is only set if Qt is configured with -reduce-relocations (which is the default). Change-Id: If2f0ab92448f03bbc3f7c828d3bca60107229072 Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Find Qt5 modules automatically in the qt5_use_modules function.Stephen Kelly2012-05-141-1/+4
| | | | | | | | | | This ensures that we only find Qt5 modules from the same directory as modules we have already found, not from multiple different directories which may be incompatible. Change-Id: I7ad1d81ec41bba2e543130740041338ba44a6c3b Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Make the qt5_use_modules public API.Stephen Kelly2012-05-101-0/+32
| | | | | | | | | | | | | | This cmake function handles all of the necessary logic for using the include directories of Qt modules, linking to Qt modules, adding the required definitions, and most importantly, adding the position independent flags required on UNIX systems to use Qt by default. The function relies on functionality available in CMake 2.8.8, so it is only available if that version of CMake or greater is used. Change-Id: Ibe698e06819129479348c240844264c41553b5fb Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Use the CMake definition of Windows for CMake macros.Stephen Kelly2012-02-231-1/+1
| | | | | | Change-Id: I599ddaaf9176f76f2e144c893e607757957dfef2 Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Convert macros to functions.Stephen Kelly2011-12-211-7/+9
| | | | | | Change-Id: I43f4188d1c33cd5a07eb7a12bf3343af7e6a211f Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Port to list(APPEND)Stephen Kelly2011-12-211-2/+2
| | | | | | Change-Id: I198622270324eea62dd5ad6343fdf7c89e736e6c Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix style in cmake macros files.Stephen Kelly2011-12-211-161/+158
| | | | | | Change-Id: I2806ce63f5948dde9c582740bc2f070900987fb5 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Use VERBATIM where needed in macros.Stephen Kelly2011-12-071-2/+2
| | | | | | | | | | Forward port of fix for http://cmake.org/Bug/view.php?id=12554 Test fails before and passes after. Change-Id: I7a3ab2369cb3095c63f9e2a3e604088ebdcc2465 Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Port to CMakeParseArguments from a custom rolled macro.Stephen Kelly2011-12-061-19/+18
| | | | | | Change-Id: Ia7bf5046420ee8f2d690d098937a212eb75b07ce Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Now that qt5_automoc doesn't exist, this macro is not needed.Stephen Kelly2011-12-061-2/+0
| | | | | | | Change-Id: I4746ed5ba41fba801599f443d1214e1744807e20 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Install CMake config files from Qt.Stephen Kelly2011-11-291-0/+208
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>