Commit Graph

18 Commits

Author SHA1 Message Date
Christian Stenger
07195cea8b Fix cmake build
Amends 88781a003f.

Change-Id: I37aa5c3fbf6490a186deacae257858d3ceb817d1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-05-02 12:41:45 +00:00
Cristian Adam
88781a003f CMake: Qt Creator Static build support
This adds the build system feature that allows Qt Creator's libraries
and plugins to be compiled statically.

Fixes some symbol clashes when all plugins are linked into the same
executable.

Support for actually loading static plugins will be added in a separate
commit.

The feature is controlled by QTC_STATIC_BUILD which by default is OFF.

Change-Id: I1fab7953c43e42dc75619e35660029ee067106df
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-29 07:16:53 +00:00
Aaron Barany
ccad4fa924 CMake: Better detect imported tool locations
On some systems IMPORTED_LOCATION isn't set, but configuration-specific
locations like IMPORTED_LOCATION_RELEASE are. In these cases, fall back to
the location of the release build if the default isn't found.

Fixes the build on Arch Linux.

Change-Id: Iff87a8356302a260b2ac5f959f835d1cdf8a5c65
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-07 20:20:38 +00:00
Joerg Bornemann
068c4e9b7b CMake: Work around Qt6::ATSPI2_nolink issue
This works around QTBUG-97023.

When building the Qt Creator super repo against the installer-provided Qt 6.2.0 on Linux,
Qt6Gui creates an imported library target named Qt6::ATSPI2_nolink.
This one must also be promoted to global scope.
Otherwise, subsequent find_package(Qt6 COMPONENTS Gui) calls fail with

  Some (but not all) targets in this export set were already defined.
  Targets Defined: Qt6::Gui;Qt6::GuiPrivate
  Targets not yet defined: Qt6::ATSPI2_nolink

Add Qt6::ATSPI2_nolink to the components that are promoted and aliased.

Change-Id: I39c46e8f1c831e2fad2aa4e928b785da08a0407c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-05 05:50:13 +00:00
Eike Ziller
40e87880fd CMake: Make it possible to run ts_* targets with Qt 6
Alias for lupdate for missing

Change-Id: I8a9a68e6d3be54ab8e1d143d3611e9d8da6d760d
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-07-14 10:15:54 +00:00
Eike Ziller
cd84331848 CMake build: Fix workaround for new *Private targets with CMake < 3.18
Amends a803d04c17

Change-Id: I2df067d988a79845f4a9f85485c13e5e2f8019dc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-07-07 14:07:06 +00:00
Tim Jenssen
a803d04c17 fix Qt6.2 builds
use foreach to be prepared for the future

Change-Id: I9157bb04479ff2376a567380c76c38b9aee900b7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-06-22 13:02:11 +00:00
Eike Ziller
c29d4e09a2 CMake build/Qt6.2: Avoid message about missing DesignerComponents
Amends 77fd87a545

Change-Id: I237a3f0b146f9fe5e2db1e1e4eb943a90fbd8db8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-18 14:07:35 +00:00
Tim Jenssen
77fd87a545 fix Qt 6.2 build
Change-Id: I426879c9ac8e1db84a39789d00e73498216e089c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-06-17 17:07:42 +00:00
Tim Blechmann
8ec23e44a2 cmake: fix Qt6Core5Compat detection
Change-Id: I6de4de1f20b4e611f632ee515cfdf5243f2d16ba
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-16 07:05:16 +00:00
Eike Ziller
c92adb199e cmake build: Map generic IMPORTED_LOCATION for Qt6 tools
There once was a time where the Qt6 build only set
IMPORTED_LOCATION_<CONFIG> but nowadays it also sets
IMPORTED_LOCATION. Use the latter to make it work with both debug
and release builds of Qt6.

Change-Id: Ic8b14209cb97b47eb6136e23390045e115a12ac0
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-11 15:34:43 +00:00
Eike Ziller
c135f4a253 cmake build: Fix documentation generation with Qt6
qhelpgenerator moved to a separate package "Tools" which doesn't exist in Qt5.

Task-number: QTCREATORBUG-24098
Change-Id: If7d0d638d6cee27f9154141ca415fb412745d1ee
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-02 07:09:40 +00:00
Eike Ziller
acd2aaa0f0 cmake build: Add missing rcc alias for Qt6
Change-Id: I353ded95f8ee8fd263d7a9f830cdcf662a250bd1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-10-30 09:20:19 +00:00
Eike Ziller
102d8d48db CMake build: Make Qt6::Core5Compat available in a portable way
While porting to Qt6 we'll need the compat library at some places.
Add a custom Qt6Core5Compat target that we can unconditionally use.
For Qt5 it refers to a dummy target.
For Qt6 it refers to the actual compat library.

Task-number: QTCREATORBUG-24098
Change-Id: Idd2b9f285352f685cfe715eee3fa046dfb468873
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-09-07 10:13:39 +00:00
Eike Ziller
43ee53c233 CMake build: Qt6 build fixes
Set Qt5_VERSION for version checks (e.g. currently still JavaScript
locator filter).

Export special FindQt5.cmake for external plugins and super-repo builds.

Change-Id: I5edb8b0e8bef1a341cd2ff04a13d0a6ce22f6558
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-09-04 07:41:57 +00:00
Eike Ziller
0ceb9f487c CMake build: Check minimum Qt version
Change-Id: I81244c2480d647a2cf48885b2a125a02b11767b4
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-09-03 12:11:34 +00:00
Cristian Adam
f6042b257d CMake Build: Fix for building with Qt6
Qt5: :moc target is being used, and it had no alias.

Change-Id: I1350507b14089d70c64ed6632e6dcce8c4881f0f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-29 08:57:14 +00:00
Cristian Adam
f88ad0e9d0 CMake Build: Allow building with Qt5 and Qt6
Emulate Qt5's functions/targets with Qt6 equivalents.

Change-Id: I6bfc5c8a649f0ddc5f1117bc5b2d0f41cb72c821
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-09-24 16:05:23 +00:00