Modules that are ported for dev should get this version now.
Change-Id: I11d47504f163798d53c51e56ef978edaa711d93a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
These features must not depend on TIFF_FOUND/WrapWebP_FOUND, otherwise
it's impossible to use the bundled libtiff/libwebp.
The default-converted conditions are good enough.
This reverts 82941a3f1b which tried to fix
the qtimageformats build. More work to fix the bundled libwebp is to be
done in the qtimageformats repo.
Change-Id: I5050a6e5f2b3c95e3d5fea660f7fbb630113b7dd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This is needed for the qtimageformats build with bundled libwebp.
Change-Id: I4d32392d7362f254e9633197497b6d78e12da559
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The AES and SHA features were checking for the wrong TEST_subarch_foo
variables.
Pick-to: 6.0
Task-number: QTBUG-87376
Change-Id: I46cd14d98832529aebac22cfcb01180330c5e091
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The correct entry for this lib is 'openssl/nolink', not
'openssl_headers'.
In configurejson2cmake's helper.py we already have
this information encoded such that the no_link_so_name field of
'openssl' points to 'openssl_headers'. Extend configurejson2cmake to
take this into account, and re-generate src/network/configure.cmake.
Pick-to: 6.0
Change-Id: I9817ea7722503a373d309b7e6fa201448d403e8d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
write_library_section traverses the parent/child hierarchy of scopes to
determine whether the scope belongs to a public Qt module. This doesn't
work for scopes that stem from included .pri files, because each
included file has its own parent/child hierarchy.
We already have an include scope hierarchy in the form of
Scope._included_children, but lack a way to get to the including
scope.
Add Scope._including_scope and adjust the is_public_module calculation
to take that into account after hitting the top of the parent/child
hierarchy.
Pick-to: 6.0
Change-Id: I8fee1cfbf048e7afc6783b0a52eaca75be17072f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This reverts commit 39b1dea2ec.
39b1dea2 is wrong, the bug is for static build of qt with static
xcb. It adds the explicit dependency of xcb-util 0.3.9, which is
not available on Debian yet.
Task-number: QTBUG-86287
Fixes: QTBUG-88688
Pick-to: 5.15 6.0
Change-Id: Iffc821f49bdfcad3f2556951d3677c35a7682266
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Generate copy and installation rules for AUX_QML_FILES entries.
These are usually handled by mkspecs/features/qml_module.prf.
For the purposes of unblocking the Designer team, instead of creating
AUX_QML file specic functions that would handle installation, generate
qt_copy_or_install() rules.
To ensure installation destination is correct, we need to group file
paths by base directory and specify those in the DESTINATION
parameter. Otherwise the file hierarchy would be flattened.
This is usually handled by file_copies.prf and the equivalent qmake
install mechanism. In CMake we need to handle it manually.
Also detect usage of wildcards to ensure we use globs for
installation.
Task-number: QTBUG-87818
Change-Id: I8a5db445274fb670d90cf90b38598a6b3326bc44
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The original non-prefixed mapping is kept for qt3d's assimp
library usage.
Adapts to b14b14e9194708cf02df1149bd735f6ce245c3e4.
Change-Id: I1beb48854ef3088a23e1d67ff855e4b7427024bb
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Useful when cleaning up configure.cmake files that might have outdated
content.
Change-Id: I3872e81b7e896de83c1f6635499316bdbe3acb16
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Modify pro2cmake converter to add extra argument to
qt_internal_add_plugin. DEFINE_IF FALSE is added to generic plugins
those had "PLUGIN_EXTENDS = - " specified in .pro files.
Fixes: QTBUG-87861
Change-Id: I9269df19a32a088f5261f50e7ffff6d29c3d605f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
When checking the value of CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG>,
then <CONFIG> must be the upper case configuration name.
Also, we must not unset __qt_ltcg_detected, because the feature
condition evaluation happens way after the feature definition, and
__qt_ltcg_detected was not available anymore there.
This commit amends 96bdcdacbc.
Fixes: QTBUG-87874
Change-Id: I2b555bd1d7fbc8973e1d9493045c27d61b0d2c1b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Change-Id: I47504d6c032c9a6ace7440580f0081cc5f254038
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The CONFIG_MODULE_NAME option to qt_internal_add_module is used to
specify what the name of a Qt module's pri file should, as well as
some of the key names assigned in that file, as well as what should be
passed to QT += in qmake projects.
When it is not specified, the computed value is the lower case of the
CMake target name. E.g. for qt_internal_add_module(Core), the computed
CONFIG_MODULE_NAME is 'core'.
The qmake variable that determines the above value is the MODULE
variable.
If it is not explicitly assigned, it's computed from the .pro file
name, rather than from the TARGET variable value.
Thus there is an inconsistency in how the value is auto-computed in
CMake compared to qmake.
We had a few special cases in projects that assign a correct
CONFIG_MODULE_NAME when the auto-computed value was wrong.
Teach pro2cmake to detect these inconsistencies and pass a correct
CONFIG_MODULE_NAME value based on the .pro file name. This way
we get rid of the special cases as well.
Aka if there is no explicit MODULE assignment in the .pro file, and the
auto-computed value by CMake is different from the one computed by
qmake, explicitly write out a CONFIG_MODULE_NAME value with what qmake
would have computed.
Task-number: QTBUG-88025
Change-Id: I166b29767e87cd6b0c681fa53238098355a177f9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
In preparation for some further regeneration.
Also modify pro2cmake to add forgotten mapping for the
Qt::EglFsKmsGbmSupportPrivate module.
Change-Id: I92425c566c2b275b40eec8c652496290754ac385
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Now that qt_add_executable doesn't set the WIN32_EXECUTABLE and
MACOSX_BUNDLE properties anymore, pro2cmake needs to look at the qmake
example projects and generate appropriate set_target_properties calls.
The relevant CONFIG entries to look at are windows, console,
app_bundle and cmdline.
CONFIG += windows implies 'subsystem windows' on Windows, which maps
to WIN32_EXECUTABLE == TRUE.
CONFIG += console implies 'subsystem console' on Windows, which maps
to WIN32_EXECUTABLE == FALSE. Aka the opposite of CONFIG += windows.
Whichever is the last one set, cancels out the other one.
CONFIG += app_bundle implies a macOS bundle executable, which maps
to MACOSX_BUNDLE == TRUE.
CONFIG += cmdline is the same as CONFIG += console and CONFIG -=
app_bundle, aka WIN32_EXECUTABLE and MACOSX_BUNDLE set to false.
In qmake, if no CONFIG is specified in an example project,
the default is CONFIG += windows app_bundle, aka WIN32_EXECUTABLE
and MACOSX_BUNDLE set to true.
The script uses a heuristic to try and not write the properties for
every single subscope, except for values different from the default.
This is not strictly correct, but it covers most use cases, and keeps
the generated projects a bit cleaner.
Task-number: QTBUG-87664
Task-number: QTBUG-86827
Change-Id: If05606ec3205e0fe7c1803c07e114d9fd9c3e4f7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The singleton modifier must be written without square brackets.
Task-number: QTBUG-87684
Change-Id: I924bbf97789edd7f2b4f2b9bbca2cb99841d2906
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Also adjust pro2cmake to use the new qt_add_executable name
instead of add_qt_gui_executable.
No compatibility functions provided this time, so we'll need to follow
through all repos and regenerate all examples.
Two reasons for not providing compaitibility functions:
1) We don't intend add_qt_gui_executable to be public API
2) A previous case with qtquickcontrols2 and qttools pointed out that
making top-level builds work with cross-compatibility API is not
simple. So just go ahead and regenerate everything.
Task-number: QTBUG-87661
Change-Id: I2f228827b786ae03bf7e1bf3908ea02a8794ed52
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
In order to funnel this through CMakeLists.txt we add an
OPTIONAL_IMPORTS entry in addition to the existing IMPORTS.
Task-number: QTBUG-87130
Change-Id: I57e882e75d17f5bc68d99ce7837425981fe6938b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This is necessary for pro2cmake.py to work on qmlcompiler.pro.
Change-Id: I356a6333d3bcc15daf6f2692a2b7ca82c9f37c85
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This option maps to FEATURE_reduce_exports. The feature is on by
default, except for MSVC. The reduce_exports configure test is not used
in the CMake build.
The <LANG>_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN target
properties are now explicitly initialized in the
qt_set_common_target_properties function, because we don't have access
to the feature in QtSetup.cmake where the CMAKE_<LANG>_VISIBILITY_PRESET
variables were set before.
Task-number: QTBUG-85373
Change-Id: I378453f0e0665731970016170302871e20ceb4e2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Offer compatibility wrapper functions until we update all of the Qt
repos to use the new names.
Task-number: QTBUG-86815
Change-Id: I5826a4116f52a8509db32601ef7c200f9bd331de
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
xcb-image includes xcb_aux.h, which is part of xcb-util.
Fixes: QTBUG-86287
Pick-to: 5.15
Change-Id: I253308008c5baeb1d061ef19f516ae6ab6dff52c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This configure switch sets the CMake variable
CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG> per release config to ON.
The feature 'ltcg' is enabled if any of the variables
CMAKE_INTERPROCEDURAL_OPTIMIZATION,
CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG> are ON.
In order to implement the check, configurejson2cmake had to be extended
to be able to write extra CMake code before and after the feature
definition. This extra code can be added to a feature mapping below the
keys "cmakePrelude" and "cmakeEpilogue".
Task-number: QTBUG-85373
Change-Id: Ia2eb907edcf087f137977a9b090705397f83eb05
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
If '-make examples -no-compile-examples' was specified, sources of Qt's
examples would be installed, but the examples would not be built.
This switch has always been a source for confusion and is only
interesting for distributors, who can just package the examples
directory tree.
Change-Id: I0291d70e4951d98b553a4abf217db49d05316d3a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Such expressions were translated to "foo NOT = 0" which is invalid code.
Change-Id: I8b485bfe1d1f553c08df3b5d59b0f39f2dcbd5c0
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
The qmake parser of pro2cmake handles completely commented lines to make
assignments like this work:
SUBDIRS = \
foo \
# bar \
bar
However, assignments like
SUBDIRS = \
foo \
#bar \
bar
were cut off at the commented line.
Fix this by allowing leading whitespace for "fully commented lines".
Change-Id: Ib5de850a02fd9b9ebb7c056c2f64f9d684334b08
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The debug feature for the CMake build is solely determined by the value of
CMAKE_BUILD_TYPE or CMAKE_CONFIGURATION_TYPES. There is no point in
restricting the autoDetect expression to developer builds or MSVC and
macOS builds.
User-visible result: -DCMAKE_BUILD_TYPE=Debug now actually turns the
'debug' feature on, also for non-developer builds on Linux.
Change-Id: I65c92575c9483bff16beb78b60606c55aeadcece
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This configure switch controls the feature 'optimize_size'.
This isn't merely a mapping to CMAKE_BUILD_TYPE=MinSizeRel, because
we potentially want to combine -optimize-size with -force-debug-info,
which maps to CMAKE_BUILD_CONFIG=RelWithDebInfo.
Task-number: QTBUG-85373
Change-Id: I1a9343ebc54816f52e90e9d33ea3df4c99b1ec9f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>