summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Fix static build linkage with CMake version lower than 3.13Alexandru Croitor2019-11-251-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | After appropriate link flags are determined, they are added to the INTERFACE_LINK_OPTIONS property. Unfortunately this property was added in 3.13, and thus static builds on Windows for instance failed with missing symbols due to missing system libraries on the link command line, when the CMake version was lower. When detecting a lower version, add the flags instead to INTERFACE_LINK_LIBRARIES, which is a property that is available in older CMake versions. To do this we have to strip the SHELL: prefix, which means that the added link flags might get deduplicated, and thus it can happen that the linking phase might still fail. Nevertheless, on Windows this improves the situation when using an older CMake version. Amends 44602224bfae7bea08e5883768cfeef6629ac503 Task-number: QTBUG-38913 Change-Id: Ib710b8ea691d4a9281dcd5f5b9700b11df0a5c10 Reviewed-by: Kyle Edwards <kyle.edwards@kitware.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-09-091-1/+5
|\ | | | | | | | | | | | | Conflicts: tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp Change-Id: Idd3ca5cb9a2b95a4c3513b2a4c8966e6f56193f1
| * Fix CMake config files for -libdir different from "lib"Joerg Bornemann2019-09-061-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | When Qt was configured with -libdir different from "lib", one could not build with CMake whenever a static lib was pulled in (e.g. uitools). Do not hard-code "/lib" but use the correct variable also for static libraries. Fixes: QTBUG-76255 Change-Id: I28c6861752e29e461247628d2b1f8a9ec32f0790 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Fabian Vogt <fabian@ritter-vogt.de>
* | CMake: Fix invalid setting of QT_PLUGIN_TYPES on interface librariesAlexandru Croitor2019-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It is forbidden to set upper case named properties on CMake interface libraries which do not start with the "INTERFACE_" prefix. Rename QT_PLUGIN_TYPES to INTERFACE_QT_PLUGIN_TYPES. There does not seem to be any usage of the property, so it's just for informational purposes, so it's a one line change. Fixes: QTBUG-77754 Change-Id: I3621f2b6188c3c72c4c2446f93ba1e078b755f72 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* | CMake: Add support for auto-importing plugins in CMakeKyle Edwards2019-08-121-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds transitive dependencies to the plugins, so that a sane set of default plugins get auto-imported when linking against a module. It also provides a new function, qt5_import_plugins(), which allows you to override the set of plugins that get imported. The decision of whether or not to import a specific plugin is based on several custom target properties and a very clever generator expression. Note that this change only imports plugins on static Qt builds. It does nothing on shared Qt builds, as the shared libraries already have their own plugin import mechanism. [ChangeLog][CMake] Added ability to auto-import non-qml plugins on CMake builds Task-number: QTBUG-38913 Task-number: QTBUG-76562 Change-Id: I2d6c8908b521cf6ba1ebbbc33a87cb7ddd9935cf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | CMake: Prevent creation of library target when it already existsAlexandru Croitor2019-08-121-0/+16
|/ | | | | | | | | | | When doing plugin auto-importing as part of a Qt static build, it can happen that the same module FooConfig.cmake file is loaded twice. Make sure not to create the same target twice if it was already created previously. Task-number: QTBUG-38913 Change-Id: I734c83ff3c0bb9e3ee9bff37971209c57abaa2b9 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Properly escape '.lib' in regexKai Koehne2019-07-111-1/+1
| | | | | | | | | | | In a CMake regex, you need two backslashes to escape a character. The .in file therefore needs four backslashes ... This amends ba4fdd99fff80 Fixes: QTBUG-76698 Change-Id: Ic757354ba596bf020c3ee5e90ee6d2d0fe3ba352 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Create Config.cmake files for internal modules in static buildsAlexandru Croitor2019-07-081-0/+4
| | | | | | | | | | | This change will create Config.cmake files for internal modules like AccessibilitySupport when doing static builds. They need to be find_package()'ed and linked in when linking in certain qt plugins. Task-number: QTBUG-38913 Task-number: QTBUG-76562 Change-Id: Ia2e446025c87df48f20bb65cfd9da6c6a4354bb1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Put the static dependencies into the relevant configurationAlexandru Croitor2019-07-051-14/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When adding the static dependencies for a module, they should be added to the debug|release configuration as appropriate, otherwise it ends up adding the debug version of the libraries to the release configuration as well as the release version of the libraries. Implementation wise, that means we have to use generator expressions of the form $<$<CONFIG:Configuration>:${dependencies}>, because INTERFACE_LINK_LIBRARIES does not have a INTERFACE_LINK_LIBRARIES_<CONFIG> equivalent that can be set per configuration. Note that the condition part of the generator expression can not explicitly check for Debug or for Release, because a user can configure their application without specifying CMAKE_BUILD_TYPE, which means that both Debug and Relase conditions would fail. So the actual condition has to be isDebug or isNotDebug. The same approach is used for INTERFACE_LINK_OPTIONS. For debug_and_release builds we use the isDebug and isNotDebug conditions for the generator expressions. For singular builds (only release or only debug), we set the generator expression condition to "1" aka always true. This means that the Qt libraries and link options will always be used regardless of the configuration with which the CMake application is configured with. Fixes: QTBUG-76337 Task-number: QTBUG-38913 Change-Id: I5369d8ba083359a4a92253dbd1dabe9d1efa34db Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* CMake: Fix handling of static dependencies that have spaces in pathAlexandru Croitor2019-07-051-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | The absolute paths of certain static dependencies can have spaces in them. The _qt5_$${CMAKE_MODULE_NAME}_process_prl_file fails to handle this, and simply replaces all spaces with semicolons, which obviously breaks the list of dependencies, and a consuming application fails to link with a message like: LINK : fatal error LNK1181: cannot open input file 'C:\Program.obj' This change partially restores the functionality that was added in 102e1822ffcdc9954d3c698f863734a8083e349c specifically the part that changes qmake to export an additional variable QMAKE_PRL_LIBS_FOR_CMAKE. This variable has the same content as QMAKE_PRL_LIBS except it uses a semicolon as a separator, so that CMake can correctly parse the separate lib entries. This is much cleaner than trying to parse the original QMAKE_PRL_LIBS variable with a complicated regular expression. Amends eda28621f6c1a68774719f382be53ec109123b18. Task-number: QTBUG-38913 Change-Id: I1d18fb779606505bc92320d8ce13232c7022e212 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add quoting to deal with empty ${CMAKE_CXX_STANDARD_LIBRARIES}Fredrik Orderud2019-06-111-1/+1
| | | | | | | | | | | | | | Done to fix broken CMake WebAssembly support, where CMAKE_CXX_STANDARD_LIBRARIES appear to be empty. The regression was introduced by ba4fdd99fff80790f764ab1ac8addd699e3101e7. This fixes the following CMake error on find_package(Qt ...): string sub-command REGEX, mode REPLACE needs at least 6 arguments total to command. Fixes: QTBUG-73475 Fixes: QTBUG-76244 Change-Id: Ieebe8cd1d49bb302dc37d8f118cc0b9376d6cdd7 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* CMake: Ignore CMAKE_CXX_STANDARD_LIBRARIES in .prl filesKai Koehne2019-04-301-1/+10
| | | | | | | | | | Do not call find_library() on libs that are part of CMAKE_CXX_STANDARD_LIBRARIES: At CMake call time they might not be found. Fixes: QTBUG-73475 Change-Id: I350b3280744883e82d83c46e70f6a7cfc8aeed2e Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-04-161-5/+5
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qlocale.qdoc tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Done-with: Edward Welbourne <edward.welbourne@qt.io> Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io> Change-Id: I88e0757b2d020f0a244714c87844631df4b3fd13
| * CMake: fix generation of config files for external Qt modules on macOSJean-Michaël Celerier2019-04-121-5/+5
| | | | | | | | | | | | | | | | | | | | This is a follow-up to f5850cb0da5d9b610711d4fd3c1eaded9d6414e1, which did not take into account some special-casing for macOS framework build, thus causing CMake to look for QtFoo.framework instead of Foo.framework. Change-Id: I261b14e75fde66fb57486bde43fc936f796a6f96 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* | Handle quotes in .prl filesKai Koehne2019-03-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Do remove quotes around libraries before trying to parse them. This patch is a follow-up to eda28621f6c1a68774719f, and fixes an issue on Windows where e.g. Qt5AxServer.prl contains entries like "-lole32" Fixes: QTBUG-73475 Change-Id: I3d1353de618328a0d44bacd4dbd6aba8fc66b1b7 Reviewed-by: Kyle Edwards <kyle.edwards@kitware.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Fix detection of libraries when linking against static builds with CMakeJean-Michaël Celerier2019-02-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is a follow-up to eda28621f6c1a68774719f382be53ec109123b18. It adds a translation of the $$[QT_INSTALL_LIBS] variable into a path that CMake understands. Without this, CMake finds the system libraries if there are any instead. It also handles the case where the .prl file contains absolute paths to libraries, as it happens for instance on Debian systems. Task-number: QTBUG-38913 Change-Id: If68373efee22bc00172e8fead3e2c12ea440787f Reviewed-by: Kyle Edwards <kyle.edwards@kitware.com> Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* | Add support for linking against static builds in CMakeKyle Edwards2018-12-071-2/+93
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change reinstates functionality that was removed in commit 102e1822ffcdc9954d3c698f863734a8083e349c. However, it differs from the original implementation in several ways: * It uses the QMAKE_PRL_LIBS variable, replacing whitespace with semicolons, rather than using a dedicated QMAKE_PRL_LIBS_FOR_CMAKE variable. * More importantly, it parses the -L and -l flags and uses CMake's find_library() command to look for the libraries in the specified search paths, and then converts them to absolute paths. This is the same approach that CMake's own FindPkgConfig module uses to find libraries specified in this form. Any other flags not of the form -L or -l (for instance, -s flags passed to Emscripten) are added to the new INTERFACE_LINK_OPTIONS target property if the CMake version is 3.13 or newer. The original implementation of this functionality was removed because of the lack of absolute library paths. At the time, it was believed that qmake would have to be modified to do its own equivalent of find_library() to get the absolute paths to the libraries. However, the approach taken by FindPkgConfig has proven robust enough to be used here, allowing CMake to find the absolute paths to the libraries without having to modify qmake. [ChangeLog][CMake] Added support for automatic linking of transitive dependencies in static builds Fixes: QTBUG-38913 Change-Id: I7d9cdb0d339c6ef697b04099d129481c770fc0fc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Export modules' enabled/disabled features to cmakeFriedemann Kleint2018-09-281-0/+3
| | | | | | | | | | | | | | | | | Add properties enabled_features and disabled_features the respective library targets. This makes it possible to query the enabled classes in dependent libraries (for example, Qt for Python). Add a test verifying whether the Open GL configuration is reflected correctly in the feature properties to the existing test_opengl_lib autotest. Change-Id: I645c947073dbb36da3be81de6bc62ee0ba1e73d6 Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove CMake code for CMake < 3.1Kevin Funk2018-03-241-16/+5
| | | | | | | | | This removes the following functions from Qt5CoreMacros: - qt5_use_modules(...) Task-number: QTBUG-63519 Change-Id: I59769060a3a93686bf319b558c0ede55755fdb70 Reviewed-by: David Faure <david.faure@kdab.com>
* Propagate all module defines to CMake config filesVolker Krause2017-08-151-2/+2
| | | | | | | | | | | So far this only covered the QT_xxx_LIB define, but not any other defines a module might export (such as QT_NO_QML_DEBUGGER which hasn't been ported to the new configure system yet). Change-Id: I8aae2354fed77a6f0e527ad8d63d25654bb067d0 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* fix module version number in qt modules' cmake config filesOswald Buddenhagen2017-05-311-1/+1
| | | | | | | | | | | | this actually just makes the code more straight-forward. amends f8607045c. Task-number: QTBUG-60936 Change-Id: Iaa05b474206cf29352f9bba516936ff30b90a778 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Don't add Qt5::<ModuleName>Private in CMake < 3.0Kai Pastor2017-04-231-1/+2
| | | | | | | | | | This change restores usability of Qt with older versions of CMake which do not provide a language feature used in the implementation of the new Qt5::<ModuleName>Private targets. Task-number: QTBUG-60229 Change-Id: I6a6a1b09be3edca200692250bb8f0d7f6a1b8f7a Reviewed-by: Stephen Kelly <steveire@gmail.com>
* CMake: Create a Qt5::<ModuleName>Private target for each moduleStephen Kelly2016-12-231-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make it depend on the corresponding Private target of each dependency. This way, user code can write find_package(Qt5Gui REQUIRED) add_executable(hello hello.cpp) target_link_libraries(hello Qt5::GuiPrivate) and get the private include directories for both Qt5Core and Qt5Gui. Don't create the Private target if any of the private include directories do not exist. This way, if user code uses one of the targets, CMake will issue an error if the private include directories do not exist. Unfortunately the error is somewhat cryptic (eg, 'the "Qt5::CorePrivate" was not found'), but this is still an improvement over an error at compile time. This is an improvement on the situation described in QTBUG-37417 using Modern CMake features. Change-Id: I034f8216c3ec64d1a3309682456a713cac9bf854 Reviewed-by: Kai Pastor <dg0yt@darc.de> Reviewed-by: Stephen Kelly <steveire@gmail.com>
* cmake: Don't mark header-only frameworks with the FRAMEWORK property.Stephen Kelly2015-04-271-0/+2
| | | | | | | | | CMake INTERFACE targets may only have whitelisted properties, and FRAMEWORK is not in the whitelist in released CMake versions. Change-Id: I27cd0cfbe1b52f25c91bf1b3c0d55879bed91bdf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Stephen Kelly <steveire@gmail.com>
* cmake: Don't populate legacy variables for header-only modules.Stephen Kelly2015-04-231-0/+2
| | | | | | | As these are a new type, there is no legacy code to support. Change-Id: Ie5abd353563d68d0449a07e06065f34db805f710 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* cmake: Generate INTERFACE targets for include-only modules.Stephen Kelly2015-04-151-2/+38
| | | | | | | | | | | | | | | | | | | Require CMake 3.0 if an attempt is made to use a cmake file containing an INTERFACE library. If the user is using a CMake version older than 3.0, then exclude INTERFACE libraries from dependencies of Qt modules. The Qt CI system is running CMake versions as old as 2.8.11, which makes that the current minimum version. The only header-only module existing so far is the QtUiPlugin module, which has been split out from the QtDesigner module. If using CMake 2.8, the forwarding headers in the QtDesigner module will be used, and the effect of the split out library will not be seen. If using CMake 3.0, the split out library is listed as a dependency and its transitive usage requirements such as the QT_UIPLUGIN_LIB definition are made available. Change-Id: Iecee3bbc440842dca27dc067f2a31e3526efa01b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* CMake: Load plugin files unconditionally if present.Stephen Kelly2014-06-221-6/+7
| | | | | | | | Task-number: QTBUG-39171 Task-number: QTBUG-39451 Change-Id: Ie66bd6b787a0957fd6f7ea673b158ab5de3cc38f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* CMake: Ensure that the EXECUTABLE_COMPILE_FLAGS list existsStephen Kelly2013-10-241-3/+3
| | | | | | | This is needed to ensure that list(REMOVE_DUPLICATES) can work. Change-Id: I3d992aa244fcdfbda7e3b48ce416e0ba5ffcde96 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Set PRIVATE includes variable to empty, not undefined.Stephen Kelly2013-10-241-5/+5
| | | | | | | This is necessary so that list(REMOVE_DUPLICATES) works properly. Change-Id: Id268637d76b1a8785c9ff0c6e09e9ad8a62bbfb6 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Generate source includes in a separate file, if needed.Stephen Kelly2013-10-161-6/+1
| | | | | | | | | | | | The source includes shouldn't be used by installations, so don't install the extra file, but only use it if the package is used from the build-dir. Task-number: QTBUG-33970 Change-Id: I08f91b8a716e935cb04d1233d44cf5c092e240ce Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-101-1/+9
|\ | | | | | | refs/staging/dev
| * Fix usr-move workaround in the presence of multi-arch.Stephen Kelly2013-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cmake directory may not be $PREFIX/lib/cmake, but instead $PREFIX/lib/<arch>/cmake. Getting the PATH of such a directory will not lead us to $PREFIX/, but to $PREFIX/lib. Use a relative calculation instead. Task-number: QTBUG-33223 Change-Id: Ice4e0f859ab1df238bad4eb942f073e84dd86cc3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| * Add source directories to include paths if needed.Stephen Kelly2013-09-051-0/+8
| | | | | | | | | | | | | | | | Task-number: QTBUG-33145 Change-Id: I555064cd92691459222463df9917f8222e31323b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Teach CMake about Qt 5 plugins.Stephen Kelly2013-09-101-0/+22
|/ | | | | Change-Id: Idd3225759f9f5ec620f79e29035eb176f965bef7 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Populate INTERFACE_LINK_LIBRARIES property in the cmake files.Stephen Kelly2013-08-211-1/+3
| | | | | | | | 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>
* Use absolute path in the /usr move workaround if -libdir is specifiedStephen Kelly2013-07-241-0/+4
| | | | | | Change-Id: I68d087b15839418008db5bf1c0c76ca303245519 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* CMake: Remove copy-pasto for the IMPORTED_LOCATIONStephen Kelly2013-07-241-1/+1
| | | | | | | | Task-number: QTBUG-32579 Change-Id: Ibe9dd92824091989168fca842a59b556937b1f08 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Don't check for the existence of private include directories.Stephen Kelly2013-07-221-5/+12
| | | | | | | | | | | 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>
* Add path to the headers in frameworks to the include dirs.Stephen Kelly2013-07-031-0/+15
| | | | | | | Task-number: QTBUG-32134 Change-Id: I30a2db3363d995ecb6e2b06c66080f7430174868 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Hardcode the VERSION reported by qmake instead of calculating it in cmake.Stephen Kelly2013-07-031-5/+5
| | | | | Change-Id: Ia83f995a64a56c845bbce1a90702a98fc83a1401 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Adjust the cmake files to find the dlls in the bin dir.Stephen Kelly2013-06-151-23/+31
| | | | | | Change-Id: I840f963c3648d123b31f79aa2c8902c0ad74e982 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Don't test existence of private header directories for mac frameworksStephen Kelly2013-06-101-1/+5
| | | | | | | | | | | These directories are not currently part of the Qt installation for mac frameworks. Task-number: QTBUG-31641 Change-Id: Ifef372cc2ebb692f9ae5a7b1f8dba5f683d1e7eb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Check that files we expect to find actually exist when using a cmake package.Stephen Kelly2013-05-201-8/+35
| | | | | | Change-Id: If7c724daa85df5e29e410b8deb4e69beb43ee8ea Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Only generate entries for private include dirs if they exist.Stephen Kelly2013-05-141-0/+8
| | | | | | Change-Id: I1d745adfbae371f8f1f76e954be98f4c2fd962e0 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Handle usr-move without forcing absolute pathsStephen Kelly2013-04-191-1/+15
| | | | | | | | | | | | | | | | | | 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>
* Minimize the contents of the INTERFACE_INCLUDE_DIRECTORIESStephen Kelly2013-04-111-4/+5
| | | | | | | | | | | The property only needs to contain the direct include dirs of a target. For example, Qt5::Gui does not need to contain the include/QtCore directory because it already has Qt5::Core in its LINK_INTERFACE_LIBRARIES. Change-Id: I69612f42c29e6056b3d15399498d041d43a0dd6b Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Don't redundantly define cmake package *_VERSION variablesStephen Kelly2013-04-051-3/+1
| | | | | | | | These variables are set by the ConfigVersion.cmake file already, so no need to maintain them manually in the Config file too. Change-Id: I73d949fb22052f4f6acbc1f70518e73f8fbf7c9c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Look for cmake package dependents only in the parent directory.Stephen Kelly2013-04-051-1/+1
| | | | | | | | | | Fedora uses configure options to set the install prefix to a location which does not contain the cmake config files. Rather than finding dependencies from the installation prefix, find them in sibling directories instead. Change-Id: I06974e9655d0dda2a18064d0f9a33997cf2cb2d3 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Populate includes, defines and pic flags in target interfaces.Stephen Kelly2013-03-271-0/+5
| | | | | | | | | | | | | | | 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>
* Revert "Don't duplicate the 'top-level' include dir in all modules."Stephen Kelly2013-03-261-2/+2
| | | | | | | | | | | | | This will likely fix some odd cmake related tests in the CI. This reverts commit 316d8ececa3314ec16baf46ec4f1c5440cd951ef. Conflicts: mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in src/corelib/Qt5CoreConfigExtras.cmake.in Change-Id: Ib7714746f96bf12061d92242a42296d200c56c00 Reviewed-by: David Faure (KDE) <faure@kde.org>