Commit Graph

37772 Commits

Author SHA1 Message Date
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
Tobias Hunger
73f5036be5 CMake: Map dlopen feature to 'ON'
Map the dlopen feature to 'ON'. The effect is that cmake will figure
out whether or not linking to 'dl' is necessary or not.

The user-visible feature is 'library' anyway: That enables dynamic
library loading -- and will link in 'dl' as needed.

Change-Id: I0d68275a7234efba7f926150f120bb37b4a1163f
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:35:07 +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
Albert Astals Cid
810c5be5be Fix xcb platform linking when compiling the nativepainting code
Change-Id: I9bc435d27bf4abf1ff4cbfebb981ab701a5d17ec
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:28:05 +00:00
Albert Astals Cid
c2511b629a Fix xlib compile test
Change-Id: Ib7d58484ef2bd0f38d3954940e7e527b4f848c4b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:27:55 +00:00
Albert Astals Cid
487adb4d7d Add devicediscovery and fbconvenience
Generated by pro2cmake.py

Change-Id: I405430c622824aab9a7bf6839b2271a494856c24
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:27:45 +00:00
Albert Astals Cid
2ce3f440f9 Allow passing libraries to qt_config_compile_test
Fixes cxx11_future and ipc_posix tests

Change-Id: I0f3a7b1a0452724c07198a87c2fc25344e7451eb
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-11 09:26:08 +00:00
Albert Astals Cid
bb0deccf19 cmake: Make sure moc/rcc/uic are built when needed
This way you can run cmake, go directly into src/widgets
and it will build moc and rcc before QtCore (because they are needed
there) and uic before QtWidgets but not before QtCore because
it's not used there.

Without this it would get stuck creating the mocs since cmake
is not expecting the moc executable to just not be there

Change-Id: Ibcb6057bfab7a4bf823544e8f7bd128ea93d1986
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-07 09:12:55 +00:00
Albert Astals Cid
6d51f69bbf cmake: Build src/plugins/imageformats
Change-Id: I4bf09c50eebf71255590e9b17e637ce621d3cd40
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-01 12:27:27 +00:00
Albert Astals Cid
70419e31f9 cmake: Fix build of xcb platform plugin when vulkan is available
Change-Id: I79760aa0cb08752cfc20aabc1a890f60c91c9dfd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-01 12:27:11 +00:00
Albert Astals Cid
b6306cb066 cmake: Only use the doubleconversion cmake config if "valid"
And by "valid" i mean if it returns the double-conversion::double-conversion
target that we are going to use later. Fedora rawhide has a
doubleconversion cmake config file but it doesn't define any target

Change-Id: Ib0360bc9fdf593a14510c9a2d59b47b32bc4b356
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-01 12:26:43 +00:00
Albert Astals Cid
773999816e cmake: glib changed name to glib2
Change-Id: I4a86bd3b01e1fe307e9802182df943245a7fce4c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-01 12:26:21 +00:00
Tobias Hunger
e616976fdf CMake: pro2cmake.py: Small fix to type markup
Change-Id: I2f7dc94f379d51c3816649849aa7365b17334ab5
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-31 15:24:09 +00:00
Tobias Hunger
6dd989fe61 CMake: pro2cmake.py: Add scope debugging support
Dump scope trees for all scopes that contain a variable
'PRO2CMAKE_SCOPE_DEBUG' (set to any value).

Change-Id: If17bb1697a32ccaa427a858c2330ab2b019d0fa8
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-31 15:23:59 +00:00
Tobias Hunger
cfbb110abe CMake: pro2cmake.py: Assign a unique id to each scope
This makes scopes much simpler to destinguish from each other.

Change-Id: I1af42f181b5899aba749bcf9267a345385149f90
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-31 15:23:22 +00:00
Tobias Hunger
0efd241d20 CMake: pro2cmake.py: report total condition when dumping a scope
Show the total_condition (if set) when dumping a scope.

Change-Id: I9dfe98c2251f1d28881771042f17d723cedc8907
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-31 15:23:09 +00:00
Tobias Hunger
ca4edbec66 CMake: pro2cmake.py: Add a way to debug merges of scopes
Generate debug output whenever a qmake scope with a variable
'PRO2CMAKE_MERGE_DEBUG' is involved in a scope merge.

Change-Id: I0ad94b881db9930de689c199adbac084efe6c03b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-31 15:22:59 +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
3e36bcdca0 CMake: Introduce QT_HAS_NAMESPACE
This makes testing for Qt with namespace builds easier in extend_target.

Change-Id: I58ab985a2ed39859fb65d35f8f69065fed2a5c9b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-31 13:57:33 +00:00
Tobias Hunger
e7e793555f CMake: Add FindZSTD.cmake and wire it up in configurejson2cmake.py
Zstd is used in the dev branch, so prepare for it.

Change-Id: I130d98e3888a1eb4c7444728fc5088c5dae9d911
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-31 13:57:24 +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
06e8dd31e9 CMake: Add debugging support for extend_target(...) calls
Enable a flag so that cmake documents which extend_target calls it
acts upon and which ones are skipped.

Change-Id: I1e2d4da47b93d6b5d7b7ec25b7bc6341f38b3dca
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-01-31 10:33:52 +00:00
Tobias Hunger
210762ae46 CMake: pro2cmake.py: Pass QMAKE_MOC_OPTIONS on to CMake
Change-Id: I39c1b0aedbffaa29a34253e0c1c4bb4a4dddbe98
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-01-31 10:02:40 +00:00
Tobias Hunger
4d4bf61f9f CMake: pro2cmake.py: Convert more settings from .pro-file to CMake
Convert QMAKE_USE, QMAKE_CXX_FLAGS and QMAKE_LFLAGS into CMake.

Change-Id: I53a5b91664b6ab71892d4381c00f8d744d7d7abd
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-01-31 10:02:24 +00:00
Albert Astals Cid
f80a37dcca cmake: Enable qdbusinterface test
Change-Id: Ia25911216790abdf463306cdb2e9aecb7dcd276e
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-01-31 09:45:38 +00:00
Albert Astals Cid
743b3d8673 Add qabstractitemmodeltester back to the build
Change-Id: I75dcfaa692465d1a96b92c81111187c4b3aeed6b
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-01-31 09:44:53 +00:00
Albert Astals Cid
f705b32acb cmake: Add fixme mentioning we need a newer cmake
Change-Id: Ie2227e1c5d8357b979436bd5997b1458bf9efef9
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-01-31 09:42:46 +00:00