summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake
Commit message (Collapse)AuthorAgeFilesLines
* Teach CMake about Qt 5 plugins.Stephen Kelly2013-09-101-0/+27
| | | | | Change-Id: Idd3225759f9f5ec620f79e29035eb176f965bef7 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* CMake: Allow specifying a TARGET in invocations of macros.Stephen Kelly2013-08-216-0/+245
| | | | | | | | | | | | 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>
* Populate INTERFACE_LINK_LIBRARIES property in the cmake files.Stephen Kelly2013-08-215-0/+183
| | | | | | | | This is new in CMake 2.8.12 and replaces the old properties matching IMPORTED_INTERFACE_LINK_LIBRARIES_<CONFIG>. Change-Id: I5d4c454972f2535f6792e95718c73d80c56ac24c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Don't check for the existence of private include directories.Stephen Kelly2013-07-221-1/+1
| | | | | | | | | | | Some packagers don't want to install the private headers. Check the existence of private headers only if the 'Private' component is specified when finding the package. Task-number: QTBUG-32466 Change-Id: I1fdbfb25e8ce485cd051564b937f766b2733741a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Only expect EGL libraries in the cmake files if Qt is configured to use it.Stephen Kelly2013-05-071-1/+1
| | | | | | Change-Id: Ida382a80dba882bbeb920756adc0c16321efe37e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Run the CMake tests with QPrinter, not QPrintDialog.Stephen Kelly2013-04-241-1/+1
| | | | | | | | QPrinter is not implemented on android, so the test fails to link there. Change-Id: I10ca0179323362a9c9f74325332043c968d67d3c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Enable OpenGL library detection for mac.Stephen Kelly2013-04-241-5/+3
| | | | | Change-Id: If99d3faf2b08ac5109d619ff69efdaa3857c007f Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add IMPORTED targets for the GL libraries used by Qt.Stephen Kelly2013-04-225-0/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Update test exclusion following bug fix in recent cmake versions.Stephen Kelly2013-04-171-2/+2
| | | | | | Change-Id: I8174ca78b4e2d8b4344278acf8ca4b0db3115d1a Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Test that the CMake files create appropriate version variables.Stephen Kelly2013-04-051-0/+10
| | | | | | | Change-Id: I1d8061302fbb8494b5ae31e20a644745fe969f10 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Populate includes, defines and pic flags in target interfaces.Stephen Kelly2013-03-275-0/+203
| | | | | | | | | | | | | | | Used by features in CMake 2.8.11. This matches the features in FindQt4 in that version of CMake, namely that the IMPORTED targets contain the appropriate INTERFACE_INCLUDE_DIRECTORIES and INTERFACE_COMPILE_DEFINITIONS and that the qtmain.lib static library is automatically linked to on Windows by executables. Additionally, the INTERFACE_POSITION_INDEPENDENT_CODE property is set appropriately if Qt requires users to use position independent code. Change-Id: Ide341f43fcaf7d722a7bdf1a12b1071c7e548ccc Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Merge branch 'dev' into stableOswald Buddenhagen2013-03-206-1/+137
|\ | | | | | | | | | | | | | | | | | | | | | | This starts Qt 5.1 release cycle Conflicts: src/gui/text/qfontdatabase.cpp src/gui/text/qharfbuzz_copy_p.h src/widgets/kernel/qapplication.cpp src/widgets/kernel/qcoreapplication.cpp Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
| * Test the OpenGLExtensions cmake module.Stephen Kelly2013-03-143-0/+79
| | | | | | | | | | Change-Id: I3cc71e035fd1c34e05ecb470f897a72a39f42ca4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Generate a Qt5ConfigVersion.cmake file.Stephen Kelly2013-03-131-1/+1
| | | | | | | | | | | | | | | | This allows finding a minimum particular version of Qt 5. Change-Id: I96112f1be90f397ec60a2b233989ac0e0380bef9 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-053-0/+54
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/generators/mac/pbuilder_pbx.cpp src/corelib/kernel/qtimerinfo_unix.cpp src/plugins/platforms/cocoa/qcocoabackingstore.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: I8d125fe498f5304874e6976b53f588d3e98a66ac
| * \ Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-283-5/+5
| |\ \ | | | | | | | | | | | | Change-Id: I12b4d8b99bdccae53b1a978cd6eb8f4ac6fb3c76
| * | | Add an umbrella cmake config file for Qt 5.Stephen Kelly2013-01-244-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I96b6e96539a84a5919992afbaee757fa080b7ae0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | | Run CMake dbus tests if dbus is expected to be available.Stephen Kelly2013-03-191-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of first finding it and then testing that we can find it. Change-Id: I1a1090693520b1d6adadef93839f25d277947e76 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | | Make the qtbase cmake tests work without the Widgets module.Stephen Kelly2013-03-182-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-28540 Change-Id: I916d104c8aba551ee9a5b34da3fd85dcb26bbf64 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | | Make cmake tests not depend on QtWidgets where not needed.Stephen Kelly2013-03-152-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib6347360d678bbe54445ebb0680ad66d77a7f3c7 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | | Clean up cmake test regarding dependencies.Stephen Kelly2013-03-151-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to list the dependencies of the Widgets module. Change-Id: I9469d4f352685f7122a258f1a44bd017fdc5b3a7 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | | Test that the ConfigVersion.cmake files work.Stephen Kelly2013-03-132-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Invoking find_package with a version but without the version file present results in an error. Change-Id: I29d662081ad5dbd7b2259abeec06affda97cbb6a Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | | Clean up the CMake dbus module test.Stephen Kelly2013-03-131-5/+3
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | The DBus module is aware of its QtCore dependency, and it doesn't need to be found explicitly. This test probably dates from when that was not the case. Change-Id: I3c78997660efed14d84b062d38d8c68dd4f7ae56 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | Populate the cmake variables only one time.Stephen Kelly2013-02-213-0/+54
| |/ |/| | | | | | | | | | | | | | | | | | | | | Since we're only including the Extras file one time, invoking set() for the include dirs again will overwrite the addition of include dirs in the extras file. We only need to populate these variables if not set anyway, so do that. Change-Id: I04dad0674778e79c8c12c18231b8ce6c92edf881 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Doc: Fix module name formatSze Howe Koh2013-01-253-5/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation QtCore -> Qt Core QtDBus -> Qt D-Bus QtDesigner -> Qt Designer QtGui -> Qt GUI QtImageFormats -> Qt Image Formats QtNetwork -> Qt Network QtPrintSupport -> Qt Print Support QtScript -> Qt Script QtSql -> Qt SQL QtSvg -> Qt SVG QtTest -> Qt Test QtWebKit -> Qt WebKit QtWidgets -> Qt Widgets QtXml -> Qt XML QtConcurrent -> Qt Concurrent (partial) QtQuick -> Qt Quick (partial) Also, distinguish between "module" and "library" Change-Id: Icb8aa695ae60b0e45920b0c8fce4dc763a12b0cd Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Generate instances of types in the CMake tests.Stephen Kelly2012-10-314-84/+32
| | | | | | | | | | | | | | | | All modules currently have a test_modules CMake test. The new module_includes test has very similar requirements, and can obsolete the hand-maintained test_modules tests in all modules. After all test_modules have been removed in other repos, the module_includes test can be renamed to that name. The types chosen need to have a constructor which can be invoked with no arguments. QtConcurrent has no public classes which fit that description so it is still tested separately Change-Id: Id7929cd32b3112c293cbf5e6964cc894a697f9b1 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add a CMake macro to test module includesStephen Kelly2012-10-261-0/+23
| | | | | | | | | | | | | | | | | The variations of includes which should work are tested. For example, in the case of testing the QtCore module and QObject include, the following includes are generated and compiled: #include <QObject> #include <QtCore/QObject> #include <QtCore> #include <QtCore/QtCore> As the private include directories are not available to the compiler, this also tests that private headers are not included from public ones. Change-Id: Id03d0fe290c9691e0f7515015892991d1701ab72 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add missing test for the Qt5PrintSupport module.Stephen Kelly2012-10-252-0/+4
| | | | | Change-Id: Ic3860cc13fbb37a1d3ae63ad100b7d722a987272 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Use the mkspec name Qt was configured with instead of default symlinkStephen Kelly2012-10-161-3/+1
| | | | | | | | | The default symlink is not available on Windows, so the qplatformdefs.h header is not available there. Instead we can bypass the symlink and use the actual mkspec name directly. Change-Id: I1d7e05f35c1ff56befab5bed307cb1755ade8377 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* CMake: Improve QT5_GET_MOC_FLAGS macroStephen Kelly2012-10-044-0/+127
| | | | | | | | | | | | 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>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2221-501/+501
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Don't attempt to test DBus on QNX.Stephen Kelly2012-08-281-1/+1
| | | | | | | It is not expected to be there currently. Change-Id: I9e0ece35b8064ecb7cb24e55604ea78c9e6ab242 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Exclude the qplatformdefs CMake test on Windows.Stephen Kelly2012-08-181-1/+3
| | | | | | | | | | The fix for this failing test is not yet agreed to. Disable it to allow progress with the CI system while the fix is decided. Task-number: QTBUG-26869 Change-Id: Ia8089b8e66d750353e7c1c69597916af0d042856 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Use POSITION_INDEPENDENT_CODE for these tests.Stephen Kelly2012-08-132-0/+4
| | | | | | | | These projects are expected to fail, but we need to make sure they fail for the right reason. Change-Id: I8a7caaa663060712c5c7113ef3b054feba2e2287 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add hints for where to find packages for projects expected to fail.Stephen Kelly2012-08-132-4/+12
| | | | | | | | In the CI system, an environment variable is used to convey the CMAKE_PREFIX_PATH, but that can not be relied upon. Change-Id: Ie4fbacaac6ae18f95a3b4d1e796a4b4c91a418c4 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add the minimum CMake version to projects built standalone.Stephen Kelly2012-08-132-0/+4
| | | | | Change-Id: If9d2a464d94faee0dccd77bc54946d91dd117db3 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Require CMake 2.8.9 for the qt5_use_modules function.Stephen Kelly2012-08-101-2/+3
| | | | | | | | | | | 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>
* Add tests of the various testlib definition possibilities.Stephen Kelly2012-07-248-0/+206
| | | | | | | | | | | The behavior of QTEST_MAIN depends on whether QT_GUI_LIB or QT_WIDGETS_LIB is defined. It could create a QGuiApplication or QApplication which could cause linking issues if the corresponding library is not linked to. The failure cases are also tested. Change-Id: I61ed0bc760564ef42ce1dbd86c83c06348c860ff Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Exclude the delayed resource file test on Windows.Stephen Kelly2012-07-231-1/+5
| | | | | | | The feature does not work there. Change-Id: I4c19577d3882b5ea01d20f4a67a512c1e6bc803e Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add a test for all QtBase modules.Stephen Kelly2012-07-233-0/+123
| | | | | Change-Id: Ib87e56f063603d474e232a137246ab6a60f63a23 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix typo: delyed -> delayedStephen Kelly2012-07-204-9/+9
| | | | | Change-Id: I1e9c17a85a52f15f252392426fa0b30c101c7c30 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Add another directory to the private INCLUDE_DIRS list.Stephen Kelly2012-07-191-0/+5
| | | | | | | | | | It should be possible to include both: * <QtGui/private/qfoo.h> * <private/qfoo.h> Change-Id: I83ed5bba633b4a6b9bd38e315c987d78beecfb1b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Dereference so we can be sure the type is not forward declared.Stephen Kelly2012-07-191-1/+3
| | | | | Change-Id: I4d67a08dc645649e767153f3aa0dc57b15d50a84 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix unit tests when CMAKE_PREFIX_PATH env var is not set.Stephen Kelly2012-07-112-2/+10
| | | | | | | | | | | | Tests which are expected to not build need to get a way to find the Qt 5 config packages. Because they use try_compile, there is no way to pass the contents to it. Work around that by generating a file containing the prefix which the tests will include. Change-Id: If43080c241539e4af5fe1c183e7da72066278b73 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Move the macros for invoking ctest to a shared location.Stephen Kelly2012-07-031-42/+2
| | | | | | | | | They are still internal, but all Qt5 modules will be able to use them then. Change-Id: I42ab656115b0976ca959293dfd664ec071f35dbf Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Factorize the cmake test infrastructure to be reusable.Stephen Kelly2012-06-261-50/+1
| | | | | | | | This makes it easy to add cmake module tests for all modules. Change-Id: I303bf7674ca6ae7a8544488f96e8e02afbaa6ff0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add a variable for the private includes for modules.Stephen Kelly2012-06-233-0/+71
| | | | | | | This is required to use QPA for example in 5.0. Change-Id: I44bfc6987d778370e55c05c591f63ff84c482d0a Reviewed-by: David Faure <faure@kde.org>
* Give the CMake unit tests more meaningful names.Stephen Kelly2012-06-2339-65/+74
| | | | | Change-Id: I0a54d32ec62ff6daf7672d0aabdeb038f4c7c78f Reviewed-by: David Faure <faure@kde.org>
* Forward-port change to QT4_ADD_RESOURCES macro for missing rcc files.Stephen Kelly2012-06-234-0/+75
| | | | | | | | Forward-port of commit 9ce67d30011db4528d3d0bbee36412e13cfb80cc in cmake.git. Change-Id: I2d6c14f68f1630fc0835b3103e5058f52c2d0d13 Reviewed-by: David Faure <faure@kde.org>
* Use IF(NOT TARGET ...) before creating imported targets.Stephen Kelly2012-05-153-0/+12
| | | | | | | | | | | | | | | | | | 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>