Commit Graph

131 Commits

Author SHA1 Message Date
Tobias Hunger
9ffcc76188 CMake: Scripts: Fix double entries in 3rd party library mapping
Change-Id: I35f29876874d6083d19382800d194e417d57bca1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:29:20 +00:00
Tobias Hunger
059f4ade7f CMake: pro2cmake.py: Fix library mapping
Fix library substitution again which broke when I merged all the
library related pieces of information.

Keep Qt and 3rdparty libraries separate so that dbus does not get
mapped into Qt::DBus (or the other way around).

Make names in helper.py more consistent while at it.

Change-Id: I5e5bf02bdabf8bafe991c5701deca76bde4df2c3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:20:50 +00:00
Alexandru Croitor
6b2de61bf9 Make zlib a required package for QtCore
Change-Id: Ifbb969fafe05e355d6874d8bebe2e8f1e80510ff
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-03 14:16:23 +00:00
Tobias Hunger
7874ce7801 CMake: Improve mapping of libraries
Merge all data related to mapping libraries into one data structure
in helper.py.

Use that data for everything related to library mapping.

This change enables way more features now like e.g. adding find_package
calls into generated files.

Change-Id: Ibbd2a1063cbeb65277582d434a6a672d62fc170b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-03 13:42:25 +00:00
Albert Astals Cid
64b31cafa1 cmake: Fix xcb_glx build
Use the actual cmake library target name

Change-Id: Icda1d232e3b920bf33ebceb00f39682050f7dedd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-03 08:13:56 +00:00
Alexandru Croitor
9b0b464e82 Write find_dependency() calls in Qt Module config files
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>
2019-05-02 07:30:42 +00:00
Tobias Hunger
37ed6dae00 CMake: Map xkbcommon_support
Qt 5.12 comes with xkbcommon_support now. Map that accordingly.

Change-Id: Id10708349d377f6bdfed654428ebcef0b533bd69
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-04-12 14:06:07 +00:00
Tobias Hunger
92b0d7b911 CMake: Support /nolink libraries
Add a helper function to QtBuild that generates Foo_nolink versions
of Foo library targets.

Map 'Foo/nolink' libs found in qmake to Foo_nolink.

Automatically run helper function to create _nolink targets as
part of extend_target.

Change-Id: I4c23ea68b3037d23c9a31d4ac272a6bd0565f7c0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-10 09:36:40 +00:00
Liang Qi
677a7a3066 CMake: Fix mappings in helper.py - WUIAS
This amends 9afc605eb5.

Change-Id: If246811d267d091c692875a1645c96767f781010
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-04-09 14:26:05 +00:00
Tobias Hunger
9afc605eb5 CMake: Fix mappings in helper.py
Some of the Qt names were wrong. Fix them and remove the work-arounds
in the library mappings.

Change-Id: I9b9afa3fb35c578e5c8d9cdef77224eb072ec8da
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-04-09 07:29:21 +00:00
Tobias Hunger
81542ffb91 CMake: Map linuxaccessibility_supportPrivate to Qt::LASP
Change-Id: I6066f69c74c39fb97a286eb92748b5c4172b1efd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-04-09 07:27:48 +00:00
Tobias Hunger
29f5c0ee70 CMake: Map cups to Cups::Cups, vulkan_support_private to Qt::VulkanSupportPrivate
Change-Id: Id03942becb08ca3ece589479ffe515f68034ddd4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-03 08:53:57 +00:00
Tobias Hunger
6a834a0c59 CMake: Map odbc to ODBC::ODBC
Change-Id: I55cf506cca87ac3e3fe9e0e1803f5118b46bf818
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:27:43 +00:00
Tobias Hunger
b0d4ac8498 CMake: Map SQLite3 to SQLite::SQLite3
Fix sqlite maping while at it.

Change-Id: I712ca562fa362a7f5857047346e8b3083f901bfb
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:27:29 +00:00
Tobias Hunger
1ac36d4bc2 CMake: Map glx_support and glx_supportPrivate
Change-Id: I777ea84a080a6856961d644a0290e4d73e07c518
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:27:13 +00:00
Tobias Hunger
61ec3d0b6e CMake: Map psql to PostgreSQL::PostgreSQL
Change-Id: I8332d2120e8b629c8722b5c9a95b47950b327d4c
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:26:58 +00:00
Tobias Hunger
0c5b63207b CMake: Map atspi2 to PkgConfig::ATSPI2
Change-Id: Ifd21eb278e06a6166ab87106c442d8ec94d92dc5
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 09:33:30 +00:00
Tobias Hunger
2268d171cd CMake: Map tslib, mtdev, libinput and xkbcommen_evdev
Change-Id: If144a8969904b63a3de3884370baaeca1cb4242a
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 09:33:05 +00:00
Tobias Hunger
2b5e3590ca CMake: Map fontconfig to Fontconfig::Fontconfig
Change-Id: I2761ef23cffefbee57da6bb1a07d06b2232d1c57
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 09:32:50 +00:00
Tobias Hunger
f375876d1a CMake: Map libudev to PkgConfig::Libudev
Change-Id: Iac5d0fbf336f0c3905a3dca20524f90432227cf4
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 09:32:34 +00:00
Tobias Hunger
66a4267f93 CMake: pro2cmake.py: Map libpng to PNG::PNG
Change-Id: Ia8dd20b777e24e2783bedb0f063db2189e0b7ed3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-03-04 09:09:04 +00:00
Albert Astals Cid
5f8e4b7cf0 cmake: add more mappings to helper.py
Change-Id: Ie5096c1fe74105db84ccd60655a20d389a887b14
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-18 08:06:49 +00:00
Albert Astals Cid
db9cb61993 cmake: helper.py more mappings
Change-Id: I69a1715bbda8f5ddfb367e7c7c693e4ec412f5c3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-15 15:08:12 +00:00
Albert Astals Cid
d523a642dc cmake: enable vnc platform plugin
Change-Id: I5015681aff3c9ceb5c0b72571bc8756f3ada104c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-12 17:02:02 +00:00
Albert Astals Cid
9bef044a0b cmake: Search and enable the sqlite[3] plugin
Added to QtFeature.cmake a way to be able to run feature_module begin
and end without having an actual module by passing NO_MODULE

Change-Id: Ib708bd3878e2591da193d18563c8932cc4b75e7f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-12 14:02:22 +00:00
Tobias Hunger
fffc12cc34 CMake: helper.py: Map harfbuzz library
Change-Id: I71daa9acf391c70c6cba99609c1f67ca5eeaa220
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2019-02-11 17:15:47 +00:00
Tobias Hunger
25457f29db CMake: pro2cmake.py: Add XCB and X11 libraries
Add all the XCB and X11 libraries needed for the XCB plugin.

Change-Id: I772b99c68521cd46cbba736912c8d8594d9d2ad8
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:34:44 +00:00
Tobias Hunger
645002cd43 CMake: pro2cmake.py: Handle more libraries
Change-Id: I561b619c4dbc56a1f6ad383a68ce4b82858a031c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-01-31 13:58:07 +00:00
Tobias Hunger
1218d8a9f0 CMake: Use FindGLIB2 from cmake-extra-modules
Use FindGLIB2 from cmake-extra-modules over hand-rolled own version.

Change-Id: I1f8e055bc12dd728c033fd88480690643d90159a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-31 13:56:55 +00:00
Tobias Hunger
2cdef0f527 CMake: pro2cmake.py: More mappings!
Add some more mappings from qmake to CMake equivalents conditions.

Change-Id: I57b7bea9d6628e1c2b8d6ae88f799219942b571e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-29 09:01:36 +00:00
Simon Hausmann
e9c45bbddd Begin port of qtbase to CMake
Done-by: Alexandru Croitor <alexandru.croitor@qt.io>
Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Done-by: Kevin Funk <kevin.funk@kdab.com>
Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Done-by: Simon Hausmann <simon.hausmann@qt.io>
Done-by: Tobias Hunger <tobias.hunger@qt.io>
Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Done-by: Volker Krause <volker.krause@kdab.com>
Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
2018-11-01 11:48:46 +00:00