summaryrefslogtreecommitdiffstats
path: root/cmake/FindWrapRt.cmake
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Fix FindWrapRtJulien Schueller2020-09-181-1/+1
| | | | | | | | We must use the LIBRT location instead of LIBRT_FOUND which is not set anywhere. I failed to replace this one in my previous patch. Change-Id: I6e2df82c31e29018d99afec1eecfb80a321fddd4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix FindWrapRtJulien Schueller2020-09-161-1/+1
| | | | | | | Actually link to librt to fix detection Change-Id: I819d9b57212fef7f539ef807846e06beb7bd617b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Display found information in some of the Find modulesAlexandru Croitor2020-06-261-0/+3
| | | | | Change-Id: I5d92f2f1a552888361a2939577c2b0177c62b596 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Namespace all our IMPORTED targetsJoerg Bornemann2020-04-291-3/+3
| | | | | | | | | | | CMake IMPORTED targets should be namespaced so that CMake knows that the name refers to a target and not a file. Use the existing WrapXXX naming scheme where applicable. Fixes: QTBUG-83773 Change-Id: I5b0b722c811200c56c260c69e76940a625228769 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix FindWrapRt module when it's found multiple timesAlexandru Croitor2020-02-251-6/+9
| | | | | | | | | | | | | | | | | On Windows, when WrapRt is qt_find_pacakge()'d the first time, the result is "not found", whereas a second time it would claim that the package is found. This is due to the WrapRt target being always created even if it has no transitive dependencies, and thus a second search would check only for the existence of the target. Fix the module to only create the target if the relevant library is found. Change-Id: I5c838cbfbafb4029f96da815a0f72e4a8e6716b0 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix a few of the Wrap modules to protect against double creation ofAlexandru Croitor2019-06-051-0/+7
| | | | | | | targets. This created issues when trying to build standalone examples. Change-Id: Iaaea2b537793ae25fbf3143cc205574446aa4ad1 Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* Write find_dependency() calls in Qt Module config filesAlexandru Croitor2019-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces a new function called qt_find_package() which can take an extra option called PROVIDED_TARGETS, which associates targets with the package that defines those targets. This is done by setting the INTERFACE_QT_PACKAGE_NAME and INTERFACE_QT_PACKAGE_VERSION properties on the imported targets. This information allows us to generate appropriate find_dependency() calls in a module's Config file for third party libraries. For example when an application links against QtCore, it should also link against zlib and atomic libraries. In order to do that, the library locations first have to be found by CMake. This is achieved by embedding find_dependency(ZLIB) and find_dependency(Atomic) in Qt5CoreDependencies.cmake which is included by Qt5CoreConfig.cmake. The latter is picked up when an application project contains find_package(Qt5Core), and thus all linking dependencies are resolved. The information 'which package provides which targets' is contained in the python json2cmake conversion script. The generated output of the script contains qt_find_package() calls that represent that information. The Qt5CoreDependencies.cmake file and which which dependencies it contains is generated at the QtPostProcess stop. Note that for non-static Qt builds, we only need to propagate public 3rd party libraries. For static builds, we need all third party libraries. In order for the INTERFACE_QT_PACKAGE_NAME property to be read in any scope, the targets on which the property is set, have to be GLOBAL. Also for applications and other modules to find all required third party libraries, we have to install all our custom Find modules, and make sure they define INTERFACE IMPORTED libraries, and not just IMPORTED libraries. Change-Id: I694d6e32d05b96d5e241df0156fc79d0029426aa Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Use CMakePushCheckStateVolker Krause2019-02-121-3/+3
| | | | | Change-Id: I58d779674363a7f7db4a7ea4ca4a9f4a9e271798 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Find librtTobias Hunger2018-11-061-0/+27
Change-Id: Ibc39ba7a385146cd0428b78e12a793f0ddbfae91 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>