Commit Graph

37848 Commits

Author SHA1 Message Date
Tobias Hunger
3726b58d3b CMake: pro2cmake.py: Simplify condition generation
There is no need to try and avoid extra () and NOTs: Those will be
removed by sympy later anyway.

Change-Id: I39d3e4d1d829579e532bfbbf6c69e0f1e06e9a22
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2019-02-11 17:16:20 +00:00
Albert Astals Cid
f18db41f85 cmake: Find tslib and build the tslib plugin if found
Change-Id: I7119ddf473a3ede29bbfef23cffb08a4fcbd5681
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-11 17:16:17 +00:00
Tobias Hunger
93564b3f8b CMake: pro2cmake.py: Treat ANDROID_EMBEDDED as ANDROID
Treat ANDROID_EMBEDDED as ANDROID when simplifying conditions.

Change-Id: I2cf0ea1e1a3e882e3a7b7276867dcee452866ade
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2019-02-11 17:16:08 +00:00
Tobias Hunger
fb33efd274 CMake: pro2cmake.py: Do not go into infinite loop
Do not go into an infinite loop when replacing a variable with itself.

Change-Id: I2765b1c0c567753f26ca75e0533c1d193362b456
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2019-02-11 17:15:58 +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
Kevin Funk
2635ab01d2 cmake: QtFeature: Do not error out when using Qt
... outside of qtbase.git

Change-Id: I1895ef07c881766e2b28839d0422916b6916e10e
Reviewed-by: Jean-Michaël Celerier <jean-michael.celerier@kdab.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-11 17:14:01 +00:00
Kevin Funk
c5e2838b64 cmake: Make find_package(Qt5 ...) work properly
Introduce a new cached variable INSTALL_CMAKE_NAMESPACE for defining the
prefix used for CMake config files (c.f. "${PREFIX}Core/${PREFIX}CoreConfig.cmake")

Also make sure to `find_dependency(...)` the required packages inside
the individual CMake config files. I.e. in Qt5WidgetsConfig.cmake,
search for Qt5Core, etc. pp..

Change-Id: Idc027925fe9d5323091c4853803ad5ce44b1afc6
Reviewed-by: Jean-Michaël Celerier <jean-michael.celerier@kdab.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-11 17:13:51 +00:00
Simon Hausmann
c5697c8597 Fix ARM build
Don't try to build the MIPS draw helpers ;)

Change-Id: If569aa41871d7e484e664382d71b8ef2b4025dce
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-02-11 17:08:22 +00:00
Simon Hausmann
92087db8f8 Fix build of neon accelerated drawing helpers
We must instruct cmake that we're interested in providing input files
for the assembler directly and the file name needs to be correct, too :)

Change-Id: I7cccb6ac66d28261ee71869991b14ac20c63050e
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-02-11 17:08:11 +00:00
Kevin Funk
082a7c4655 cmake: Parse SYNCQT.INJECTIONS
Allows to install headers such as QtCore/qtconfig.h,
QtGui/qvulkanfunctions.h, etc.

Change-Id: I93f384cdc8bbee07fab316d7e232aae1d209f33e
Reviewed-by: Jean-Michaël Celerier <jean-michael.celerier@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 16:51:27 +00:00
Liang Qi
08cefb6e63 cmake: build the offscreen platform plugin on macOS
This amends beace29a57.

Change-Id: I38fef70687f36d3b2ab4ff9cd001dc35cc79942d
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-02-11 16:51:10 +00:00
Albert Astals Cid
391ceb1d76 cmake: build libinput plugin
Change-Id: If263e6fa212f5349ad5e75252ff77ce0c92c5b75
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-02-11 16:37:43 +00:00
Albert Astals Cid
a3506fd4df cmake: build the tuiotouch plugin
Change-Id: I3e448fa8c21651a31429a87ee0b209eaea0fe1b1
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-02-11 16:37:05 +00:00
Albert Astals Cid
9dbcbeb1de cmake: enable evdevtablet plugin
Change-Id: Ia2d8c88b4c36c7c6e71a49f42398ebd0378239c1
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-02-11 16:36:57 +00:00
Albert Astals Cid
db8e4077d1 cmake: Enable evdevkeyboard plugin
Change-Id: I74b000ce657dbc0573f97a095391902917fe8f80
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-02-11 16:36:01 +00:00
Albert Astals Cid
3e18790103 cmake: enable evdevtouch plugin
Change-Id: I7c8a7bd6ce79ca6823c0e517ef80c9418b91e552
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-02-11 16:35:51 +00:00
Albert Astals Cid
6f5e8c8e18 cmake: Enable evdevmouse plugin
Change-Id: I5c213a946d6127d635cd76bc827201e379e75aa9
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-02-11 16:35:40 +00:00
Albert Astals Cid
4ac0afb8ba cmake: build the minimalegl platform plugin
Change-Id: I5c509efa30257be6ccc3455dd40bef3882b7e1da
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-02-11 16:35:21 +00:00
Kevin Funk
7830b72fd5 cmake: gui/vulkan: Generate files in correct dir
This is where headers.pri expects them

Change-Id: If518704ae7bfcae3e898a0da61f9b1e6ae6effbb
Reviewed-by: Jean-Michaël Celerier <jean-michael.celerier@kdab.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-11 16:19:23 +00:00
Albert Astals Cid
6a2577e04b cmake: don't die when running on macOS
still same result for me on Linux

Change-Id: Icb74ffc5989c0b96f069f6ec33c2a707e012414b
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-02-11 16:13:58 +00:00
Liang Qi
5ad3803def cmake: fix harfbuzz target
If doesn't build with harfbuzz::harfbuzz, please check
harfbuzz-config.cmake in system. Latest harfbuzz has it.

Change-Id: Idaaa77dc748ba2228b4e67e72a495bed93bc0192
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-02-11 15:18:37 +00:00
Михаил Светкин
6c8fb8aad8 cmake: Fix build widgets on macOS
Change-Id: I9c7b7e1677f665861f8a106244468bdc0e1386f2
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-02-11 15:10:22 +00:00
Simon Hausmann
a372783f66 Fix linkage against freetype
Target "XcbQpa" links to target "Freetype::Freetype" but the target was not

There was indeed a find_package(Freetype) missing

Change-Id: I486adbcf3b4ed0ae849a11294e2b83d2dc45d66f
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-02-11 15:00:41 +00:00
Albert Astals Cid
8ee0cb04bd cmake: build glxconvenience
Change-Id: Iad09a86d11565665bb06d8d5d5616fc1b35ad777
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 14:02:12 +00:00
Albert Astals Cid
beace29a57 cmake: build the offscreen platform plugin
Change-Id: I6ccd430a2779fb889329cd411221c29b2601acfb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 14:01:25 +00:00
Albert Astals Cid
7edcdd7ac0 cmake: build minimal platform plugin
Change-Id: Icd80b33e2840ab1d34d2502bfdc3cb9116bdfba4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 14:00:54 +00:00
Albert Astals Cid
ad312879b5 cmake: Build platformcompositor
Change-Id: Ib9855e8ce0abddf5dce3408f10d3c2d32a2df937
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 14:00:23 +00:00
Albert Astals Cid
553254ba50 cmake: build eglconvenience
Change-Id: Iba578190feb06953bfcba62978d2ba5b7ff35cb7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 13:59:50 +00:00
Albert Astals Cid
324bf0f344 cmake: build linuxfb platform plugin
Change-Id: I74c84ca410bdcf9c46828c5da903e241b2fa5d0d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 13:25:52 +00:00
Albert Astals Cid
8a1110f388 cmake: build kmsconvenience
Change-Id: I3e1cdb4b9dd26a74262a183d8137ed2011a6e52d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 13:25:09 +00:00
Albert Astals Cid
6b637d1afe cmake: Use the proper libudev library
Change-Id: I884756473a8c26a4ef17472aaaceb94509d3c72f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 13:24:41 +00:00
Albert Astals Cid
03d096d11a cmake: enable src/platformsupport/input
Change-Id: Iafe75f55c579779d3d25a0147d993904622161fa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 13:24:01 +00:00
Albert Astals Cid
5716bcf6f7 cmake: we need to find for libudev not udev
Change-Id: I36bac8c01d8de2b151c3d4d89607d26ac8add3d2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 13:20:45 +00:00
Albert Astals Cid
3e784f2be0 cmake: we need two different qmyserver names
All the binaries now end up in bin/ and since the two qmyservers used
for testing dbus have slightly different implementations we need both,
so rename one to qmyserver_qdbusinterface

Change-Id: I1db1aa8f96f35c6ca41254295e2477c35f915850
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2019-02-11 11:07:38 +00:00
Kevin Funk
99e14037e2 cmake: QtFeature add debugging aid
Persist the target name in the CMake cache description

Change-Id: I124a8b89e5845d12301993b0546c8d5c91b8d8bb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 10:53:50 +00:00
Kevin Funk
04ff8b5b6a cmake: Do not rerun try_compile invocations
Change-Id: I5eccf9f810d7ee55a311884bd5cf483f8086bae6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 10:53:41 +00:00
Tobias Hunger
b388bc7e77 CMake: pro2cmake.py: Handle equals(foo, bar) in conditions
This adds an overly simplistic mapping -- just like it does for the
rest of the qmake test functions.

Change-Id: I0c9e3b70c1c3d0c68a245706a141aa7b7cb4d8bf
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-02-11 10:46:29 +00:00
Simon Hausmann
4a9d96cd91 Fix make install
Pick up mkspecs/ from the top-level project (qtbase) directory

Change-Id: I78c69f31219484cc7eaa408b0a7e3eeaa0ac6cf2
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-02-11 10:31:28 +00:00
Simon Hausmann
6a4c7a82f8 Require cmake 3.14 proper
It appears that the latest cmake provides 3.14 as a proper version.

Change-Id: Ib0f0a1bbdd11e2129f25618b412015a2456aaba1
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-02-11 10:31:19 +00:00
Albert Astals Cid
5682ca156c cmake: Fix linking of the opengles tests
The FindOpenGL.cmake file in cmake has a comment that is not very
reassuring this should work, but it actually works for me

Change-Id: I05b0ac6ec551252f8c58ab7abf4254d2d09a069c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 10:26:21 +00:00
Simon Hausmann
ab2265cad7 Ignore cmake build directories that are typically in place
Change-Id: Icc31c4ac348bd55af383626ff86cae91e695d274
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-11 10:15:13 +00:00
Albert Astals Cid
337ab23665 cmake: Fix linking of the libinput_axis_api test
Change-Id: I7b70643e013b01d48f347bd5b3db9506793e46a4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-11 10:03:12 +00:00
Albert Astals Cid
9afca46e37 cmake: Fix linking of the egl_x11 test
Change-Id: Id350e1cf85de67d1f27f6bfc94316bed115b377f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-11 10:02:33 +00:00
Albert Astals Cid
622816499d Add moc dependency also to CorePrivate
Otherwise if you start a make -j14 in src/sql without having built
anything it would hang because sql only depends on CorePrivate and not
Core and thus moc would not be build at the right time

Change-Id: I916242782e6aea4a0491d870391f91182959ca7c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-11 10:01:38 +00:00
Albert Astals Cid
f88e78fd19 test: Make qheaderview test build
it's using deprecated reset() model that we don't support anymore since
"this is Qt6", so include the 2 lines in the code.

This makes for bad code but since it's a test and it used to work i
guess it's good enough

Change-Id: Ia906fe40359ddc0defb10795cf12a17498124983
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:49:37 +00:00
Tobias Hunger
35a30c7ebb CMake: pro2cmake.py: Expand qmake values in file names, etc.
Expand qmake values when dealing with source file names, include
directories and more. This handles cases where variables are used
to refer to sources (e.g. $$VERSIONTAGGING_SOURCES in corelib) as
well as things like $$QT_SOURCE_TREE and friends.

Note that $$PWD and $$OUT_PWD are still need hand-holding since they
refer to the scopes directory relative to the top level directory --
which pro2cmake.py does not know.

Change-Id: I011ef55416ff820053d5f844b3008836849f5075
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:39:36 +00:00
Tobias Hunger
199cce0c20 CMake: pro2cmake.py: Better mapping of complex conditions
.pro-files support things like contains(Foo, bar), etc.

Map that in such a way that only one identifier will be visible to
CMake to unconfuse the logic handling on that side. These conditions
will need manual fixup later!

Change-Id: Id4946e694a9adccf9f54bcce26a6c227cd921007
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:38:33 +00:00
Tobias Hunger
d796410045 CMake: pro2cmake.py: Remove some dead code
Change-Id: I8e3e7e4c4ef9747e0749734bdf875baccc4646bd
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-02-11 09:37:46 +00:00
Tobias Hunger
6104643db0 CMake: pro2cmake.py: Remove leading ./ in paths
Remove leading './' from paths before writing them into CMakeLists.txt.

Change-Id: I5680a3470cf491a8805b559197f94f8e6a6ce9b7
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:36:00 +00:00
Tobias Hunger
64e3c8bb19 CMake: pro2cmake: Fix handling of chained scopes with else branches
Fix handling of things like:

foo:bar:buz: {
    do something
} else: wat {
    do something else
}

The else relates to foo AND bar AND buz, not just to buz in this case.

Change-Id: I40d1fa295b4d6dd95ae5e1ce2d58372edc807b86
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:35:29 +00:00