summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Remove old Qt 5 CMake build system filesAlexandru Croitor2020-10-011-650/+0
| | | | | | | | | | | | | | | Remove the stale Qt 5 CMake files. Disable the generation of CMake files by the qmake build system, it wouldn't create usable Qt 6 files anyway. Keep mkspecs/features/create_cmake.prf and mkspecs/features/cmake_functions.prf for now until we can confirm that they are safe to remove. Task-number: QTBUG-86827 Change-Id: Idcf59f4d7d5474171a9bf72904ff19adc8bc74cd Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Allow switching of QT_NO_CREATE_VERSIONLESS_TARGETSKai Koehne2020-05-051-8/+8
| | | | | | Fixes: QTBUG-83774 Change-Id: Ib3f2507a917046426b94a779e205012ce52cbfe9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-04-081-0/+4
|\ | | | | | | Change-Id: I34a71ddbc6afb1f12a0a044d0d3876e1af58d60c
| * Fix linking of header only Qt5Zlib for cmake static buildsKai Koehne2020-04-061-0/+4
| | | | | | | | | | | | Fixes: QTBUG-79547 Change-Id: Ibd810b5415ae8f7a965caf8b94b0df834a867836 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix whitespace in Qt5XXConfig filesKai Koehne2020-03-241-5/+1
| | | | | | | | | | | | | | Remove some unneeded empty lines, and fix indentation. Change-Id: Ie35e95f35f9625cc75070074be96bdeb62d5fd4c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: Also import Qt plugins that are not literally named *PluginKai Koehne2020-03-241-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are some plugins in qtlocation, qtdeclarative whose names are not suffixed with 'Plugin', so the current logic fails to load the corresponding QtModule_XXX.cmake file. Work around this by just searching for Qt5$${CMAKE_MODULE_NAME}}_*.cmake. Users can define QT5_STRICT_PLUGIN_GLOB or Qt5$${CMAKE_MODULE_NAME}_STRICT_PLUGIN_GLOB to change back to the old behavior. [ChangeLog][cmake] Fixed an issue where some Qt location and declarative plugins whose name did not end with "Plugin" where not imported by the corresponding Qt component package. You can force the old behavior by setting QT5_STRICT_PLUGIN_GLOB or Qt5ModuleName_STRICT_PLUGIN_GLOB before the find_package(Qt5 ...) call. Fixes: QTBUG-58812 Change-Id: Ic8adf9562841ed49eabc4f7fb2b5ae257ca606cd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-121-1/+1
|\| | | | | | | Change-Id: I8caee4d1ce0eed27d905194df3c3d46c5d07d2b0
| * CMake Support: Fix dependent libraries search for MinGW and CMake 3.17Cristian Adam2020-02-101-1/+1
| | | | | | | | | | | | Fixes: QTBUG-81903 Change-Id: Ie2847e38c196c1f9d664b1a35339cca5ebf424cc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-291-3/+12
|\| | | | | | | Change-Id: I98b1a5a11ece3957a1115c1d9be8841759206ffe
| * [CMake] Fix handling Qt frameworks link flags in static lib depsAlexandru Croitor2020-01-181-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | QMAKE_PRL_LIBS_FOR_CMAKE can contain "-F/foo/bar" entries which are search paths for where frameworks should be found. These should be passed as HINTS to find_library when searching for frameworks. Fixes: QTBUG-81369 Change-Id: I4f699800bd49a1f368b6132823e23d08d1fae604 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | CMake: Add Qt6 forward compatible CMake API and targetsAlexandru Croitor2020-01-251-0/+31
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create Qt:: versionless targets for libraries and tools. So Qt::Core will link to Qt5::Core. Add additional feature properties to targets, with the same name they have in Qt6: QT_ENABLED_PUBLIC_FEATURES, QT_DISABLED_PUBLIC_FEATURES, QT_ENABLED_PRIVATE_FEATURES, QT_DISABLED_PRIVATE_FEATURES, to be forward-compatible with Qt6. Prefix properties with INTERFACE_ for interface libraries. Create functions with no major version in their prefix, so qt_foo instead of qt5_foo. The non-versioned functions will call the versioned functions, depending on the value of QT_DEFAULT_MAJOR_VERSION, which can be set by an application developer before finding the Qt package. Set QT_DEFAULT_MAJOR_VERSION to 5 if the value has not been defined in the current scope. Application developers can set QT_NO_CREATE_VERSIONLESS_FUNCTIONS to TRUE before calling find_package(Qt5) to suppress creation of the non-versioned functions. Application developers can set QT_NO_CREATE_VERSIONLESS_TARGETS to TRUE before calling find_package(Qt5) to suppress creation of the non-versioned targets. Setting these can be useful when both find_package(Qt5) and find_package(Qt6) are in the same project. If none of these are set by the user, then the first find_package(Qt5) will create versionless targets with the major version being "5", which means the second find_package(Qt6) will not create versionless targets. Handle versionless plugin names in qt_import_plugins, so both Qt::QCocoaIntegrationPlugin and Qt5/6::QCocoaIntegrationPlugin are recognized by the function. Allow specifying multiple types in EXCLUDE_BY_TYPE in qt_import_plugins, to be consitent with the Qt 6 version. Make sure to set the QT_PLUGIN_CLASS_NAME property to compatible with Qt 6. Task-number: QTBUG-74137 Task-number: QTBUG-80477 Change-Id: Ib89d090ea6f7794d7debd64f03f29da963a17ca7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix usage requirements for static builds of Qt on macOSJoerg Bornemann2020-01-061-9/+19
| | | | | | | | | | | | | | | | When scanning the prl files to set up usage requirements for the Qt libraries we omitted "-framework Foo" flags. Those were passed as linker flags, but not as interface libraries. Consequently, the frameworks that are used by Qt libraries were missing on the link line when building against a statically built Qt. Fix this issue by scanning the dependencies for "-framework Foo" just like we do with "-lfoo" flags. Fixes: QTBUG-80855 Change-Id: Ie7804304141c86207d143a6e1005e78bdc099113 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Kyle Edwards <kyle.edwards@kitware.com>
* 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>