qt5base-lts/util
Alexandru Croitor 65fe5b2ce2 CMake: pro2cmake: Handle CONFIG+=console app_bundle in examples
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>
2020-10-27 12:49:39 +01:00
..
accessibilityinspector Another round of replacing 0 with nullptr 2020-10-07 23:02:47 +02:00
aglfn Updated license headers 2016-01-21 18:55:18 +00:00
cmake CMake: pro2cmake: Handle CONFIG+=console app_bundle in examples 2020-10-27 12:49:39 +01:00
corelib/qurl-generateTLDs Use QList instead of QVector in util 2020-07-07 20:34:48 +02:00
edid Minor grammar fixup 2018-08-03 18:11:24 +00:00
glgen Remove the openglextensions module 2020-06-10 09:35:04 +02:00
gradientgen Replace Qt CONSTEXPR defines with constexpr 2020-08-14 15:52:58 +02:00
harfbuzz Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
includemocs QtCore: include mocs 2017-05-05 03:03:30 +00:00
integrity Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
lexgen Use QList instead of QVector in util 2020-07-07 20:34:48 +02:00
locale_database Update CLDR to v37, adding Nigerian Pidgin as a new language 2020-10-26 15:28:59 +02:00
plugintest Updated license headers 2016-01-21 18:55:18 +00:00
qfloat16-tables Round float->qfloat16 to even 2020-09-06 12:35:12 +02:00
unicode Use checked string iteration in case conversions 2020-08-29 18:15:27 +02:00
x86simdgen Move qsimd* from corelib/tools to corelib/global 2020-03-26 09:15:32 +01:00
xkbdatagen Updated license headers 2016-01-21 18:55:18 +00:00