summaryrefslogtreecommitdiffstats
path: root/util/cmake
Commit message (Collapse)AuthorAgeFilesLines
* Fix mapping of MultimediaQuick internal moduleAlexey Edelev2021-06-221-2/+2
| | | | | | | Pick-to: 6.2 Task-number: QTBUG-94613 Change-Id: I7d5954c176c0f036a27b4ab1312505b77b2c67d5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix internal module mappings of the qtdeclarative repoAlexey Edelev2021-06-111-8/+8
| | | | | | | | Add 'Private' suffix to the internal module names in the mappings of the qmake files for modules of the qtdeclarative repo. Change-Id: I1592ebad0f0db553322ea766561b1b8c3fd38aea Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update internal module mappingsAlexey Edelev2021-06-101-5/+5
| | | | | | | | Add 'Private' suffix to the internal module names in the mappings of the qmake files. Change-Id: Iacc487aa5e463a522341e526bf8580be2868cf37 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Bump versionJani Heikkinen2021-06-101-1/+1
| | | | Change-Id: I4a862360d627f1ea18a27920bb440da28ddc5b22
* Fix support for using system supplied md4c libraryNiclas Rosenvik2021-06-031-0/+1
| | | | | | | | | | | | | | | | | | | Add FindWrapSystemMd4c.cmake so that the old md4c target can be used as well as the new one and set WrapSystemMd4c_FOUND. Link to the imported target WrapSystemMd4c::WrapSystemMd4c if the system library is used. Add qt_find_package line to find the package in configure.cmake. Fix the condition for enabling system-textmarkdownreader, it includes testing for textmarkdownreader because even if the code would compile correctly without it, it looks strange when the output says "textmarkdownreader no" and under "using system libmd4c yes" even if libmd4c is not used. Use system include when system-markdownreader is enabled. Add library mapping for libmd4c. Change-Id: Id5d5b13d6691a8c1cdf627238887977c847c1e67 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add the 'Private' suffix to the internal module name by defaultAlexey Edelev2021-05-311-0/+1
| | | | | | | | Modify pro2cmake to add the 'Private' suffix to the internal module name by default. Change-Id: Ia7b2fce387fad5f207a7379ac738173ff9262071 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add the 'Private' suffix to the internal module namesAlexey Edelev2021-05-311-16/+16
| | | | | | | | Rename internal modules to adjust their names to the internal module policy. Also modify mappings of the qmake file converters. Change-Id: I69aee1e8136c2379608d9d22d718f8c8a5f73124 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix BASE argument of qt_add_resourcesJoerg Bornemann2021-05-181-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BASE argument of qt_add_resources now denotes the root point of the alias of the file. Before, BASE was merely prepended to every file that got passed to qt_add_resources. Old behavior: qt_add_resources(app "images" PREFIX "/" BASE "../shared" FILES "images/button.png") Alias is "../shared/images/button.png", and pro2cmake generated QT_RESOURCE_ALIAS assignments to fix this. New behavior: qt_add_resources(app "images" PREFIX "/" BASE "../shared" FILES "../shared/images/button.png") The alias is "images/button.png". No extra QT_RESOURCE_ALIAS assignment is needed. The new behavior is in effect for user projects and for Qt repositories that define QT_USE_FIXED_QT_ADD_RESOURCE_BASE. Qt repositories will be ported one by one to this new behavior. Then the old code path can be removed. Pick-to: 6.1 Task-number: QTBUG-86726 Change-Id: Ib895edd4df8e97b54badadd9a1c34408beff131f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Add support for standalone CMake test configurationCristian Adam2021-04-271-0/+6
| | | | | | | | | | | | This patchset adds the bits needed for manual tests to work standalone. Amends ebaa1c15a101579d9296336491e36c63b979f18d Pick-to: 6.1 Task-number: QTCREATORBUG-25389 Change-Id: Ifc70391bda2a3eea3c7492a58353a703cdc3114c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Introduce zlib find script to work around hardcoded iOS SDKAlexandru Croitor2021-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xcode allows building a project targeting either the device or simulator sysroot in one single build dir, but for the sysroot switching to work there should be no linker or compiler flags referencing absolute paths of a specific sysroot. During CMake configuration of a project targeting iOS, all found system libraries will be within one single sysroot, either the device one or the simulator one, whichever one was passed to CMAKE_OSX_SYSROOT. CMake will then generate the Xcode project and pass those absolute paths, which makes sysroot switching within Xcode not work. To avoid that, the CMake documentation recommends passing linker and framework flags of the form '-lfoo' and '-framework bar' instead of absolute paths. Xcode then takes care of setting the correct framework search path. Zlib is one of the libraries found in the iOS sysroot and thus passed as absolute path. To avoid that, create a new FindWrapZLIB find script. The target it creates will pass the absolute path to the library on non Apple platforms and an -lz linker flag on Apple platforms (macOS and iOS). To avoid issues with target global promotion when system PNG package is found, ensure that a found ZLIB::ZLIB target is promoted to global manually in src/gui/configure.cmake. Pick-to: 6.1 Change-Id: I8bd8649be4f680a331ad51925f27cb9d13ac5e5f Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: pro2cmake: Use latest project version for qml import versionAlexandru Croitor2021-04-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Use PROJECT_VERSION instead of CMAKE_PROJECT_VERSION when setting the version of a qml module, which extracts the version of the latest project() call rather than the top-level one. Using CMAKE_PROJECT_VERSION caused issues in top-level builds where the qtdeclarative version is 6.2, but the top-level project version is still 6.1 and hasn't been updated to 6.2, causing qml module import errors. This was probably an oversight during initial implementation of qml support in pro2cmake. So projects that define qml modules should be adapted accordingly. Amends cce8ada8141d786c1deda78fdba485b4c67f9687 Amends 28fff4a5519c8e1068450a052cb19fb2149e9726 Pick-to: 6.1 6.0 Task-number: QTBUG-92861 Change-Id: I494784694e997501a5bc4fd0c0eac458ddc248aa Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix backtrace on non-linux systemsNiclas Rosenvik2021-03-221-0/+1
| | | | | | | | | | | | On BSD systems backtrace lies in libexecinfo. Use FindBacktrace from CMake to be able to resolve backtrace on more unixes than linux. Change-Id: Ie14fd1727d2da03645fc2d6de10c0217baabad6b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Enable X11 on other platforms than just LinuxNiclas Rosenvik2021-03-161-2/+6
| | | | | | | | | | | Set CMake variable X11_SUPPORTED for all systems that have X11. Adjust _adjust_library_map() in util/cmake/helper.py to apply X11_SUPPORTED condition around X11 related packages instead of just LINUX. Adjust configure.cmake in src/gui based on this change. Why, because X11 is not just Linux. Change-Id: Ic3c04eaa55301d1237c7e74281eccd4f8e27e9ce Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add QtIvi Modules to cmake util helper.pyDominik Holland2021-03-101-0/+6
| | | | | Change-Id: Id3b9847a78725fc53d16d8f942126bc0d7a76410 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Set default API version to the latest versionJoerg Bornemann2021-03-091-2/+2
| | | | | Change-Id: I83ac2eb3ca36e1454d34fd0181ce0dccc775b47f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* configurejson2cmake: Add library mapping for libmngJoerg Bornemann2021-02-241-0/+1
| | | | | | Pick-to: 6.1 Change-Id: Ic6a45ecf14791cd6e780b7b0cb52c7b7275e968a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Do some miscellaneous tidy-up in util/cmake/Edward Welbourne2021-02-152-10/+5
| | | | | | | A typo-fix, a simplification and a trivial restructuring. Change-Id: I434457c4eb83eebfb9b472c6914659199fe5be71 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Use newlines more consistently in generate compile-test codeEdward Welbourne2021-02-151-12/+14
| | | | | | | | | | | The generated code contained many repeated blank lines. Most main()s were preceded by one, but not all. Only include blank lines for actual empty entries in lists, where configure.json specified them, plus one before main if anything else precedes it. Change-Id: I6e6c34940e08712a1aa848a3c9ad1b0fb5806d77 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Simplify test-snippets in configure.cmakeEdward Welbourne2021-02-151-2/+1
| | | | | | | | | The main(void) signature obviates the need for unused parameters and has existed since (at least) C89; so use that instead of the old-fashioned argc/argv arguments we don't use in any of these tests. Change-Id: Ibfe850a1fce378673c9781011475ea623fd75ad4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Update name of c++2a to c++20Kai Köhne2021-02-101-1/+1
| | | | | | | | | | Keep the c++2a feature, but make it an alias for compatibility purposes. Pick-to: 6.1 Change-Id: I6f153109be84659806f1b7a57a88a187875166d8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Change XCB::XFIXES condition in library mappingAlexey Edelev2021-01-261-2/+4
| | | | | | | | | Replace condition of XCB::XFIXES from the 'XCB_XFIXES_FOUND' variable to 'TARGET XCB::XFIXES'. Fixes: QTBUG-89979 Change-Id: I77b8b4046dc6852ecb209d942ee94d864a35c378 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Update pro2cmake to require CMake 3.16Andreas Buhr2021-01-221-1/+1
| | | | | | | | pro2cmake generated CMakeLists.txt with cmake_minimum_required(3.15.0). But 3.16 is required now. This patch updates pro2cmake.py accordingly. Change-Id: I8283e1c4da4d2d36e1d9127cab410c7bfc58830c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* pro2cmake: Raise QT_REPO_MODULE_VERSION to 6.1.0Joerg Bornemann2021-01-201-1/+1
| | | | | | | | 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>
* pro2cmake: Add mapping for Qt::StateMachineJoerg Bornemann2021-01-191-0/+1
| | | | | Change-Id: I0ccc9082cc6417584013dde248ab3347aad5b87c Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* FindLibb2: Don't rely solely on pkg-configCraig Scott2021-01-181-1/+1
| | | | | | Task-number: QTBUG-86283 Change-Id: Ie455d7cfc6e6f9ae8297f8bc0daf2816ccce91b6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Add --enable-new-dtags flag supportAlexey Edelev2020-12-221-1/+0
| | | | | | | | | | | | | Remove enable-new-dtags from feature mapping, handle it as regular feature. Regenerate configure.cmake with 'enable-new-dtags' enabled. Check for enable_new_dtags feature, add -Wl,--enable-new-dtags if enabled. Fixes: QTBUG-89013 Pick-to: 6.0 Change-Id: Ice57c02dc85f7f9ecf14e3bc65f31a57b589ce24 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Craig Scott <craig.scott@qt.io>
* configurejson2cmake: Rename assimp to qt3d-assimpJoerg Bornemann2020-12-211-3/+3
| | | | | | | Adapt to changes in qt3d. Change-Id: Ie21425ef30442c9ca4d6f288f8ca8bf8d4e4f6e3 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* configurejson2cmake: Fix conditions of features 'tiff' and 'webp'Joerg Bornemann2020-12-091-2/+0
| | | | | | | | | | | | | 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 82941a3f1bab6c385376761d53456c838b6cbaad 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>
* pro2cmake: Handle conditions for feature system_webpJoerg Bornemann2020-12-091-0/+1
| | | | | | | This is needed for the qtimageformats build with bundled libwebp. Change-Id: I4d32392d7362f254e9633197497b6d78e12da559 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake: Add mapping for qmldom libraryAlexandru Croitor2020-12-091-0/+1
| | | | | Change-Id: Ibd8dbec5fa04192fc57a233a18908cba290f986b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add qt chart mapping to cmake utils helper.pyMichal Klocek2020-12-041-0/+1
| | | | | Change-Id: I5d9e42dc221419c2f21a533f3fc27ce67ef84450 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix conditions for some subarch featuresAlexandru Croitor2020-12-041-3/+3
| | | | | | | | | | 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>
* CMake: Fix QMAKE_LIB of WrapOpenSSLHeaders libraryJoerg Bornemann2020-11-301-1/+10
| | | | | | | | | | | | | | 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>
* pro2cmake: Fix is_public_module calculationJoerg Bornemann2020-11-301-5/+19
| | | | | | | | | | | | | | | | | | | 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>
* Revert "xcb: add xcb-util dependency for xcb-image"Liang Qi2020-11-301-7/+0
| | | | | | | | | | | | | | | This reverts commit 39b1dea2ec5cde9523df61c78dec5d4b195f66d2. 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>
* CMake: pro2cmake: Reformat scripts using black8 againAlexandru Croitor2020-11-123-57/+98
| | | | | Change-Id: I1b024867e76baa2e443e95a5e980745b65ee1f19 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: pro2cmake: Handle AUX_QML_FILES installationAlexandru Croitor2020-11-121-0/+65
| | | | | | | | | | | | | | | | | | | | | | 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>
* pro2cmake.py: support for PAST_MAJOR_VERSIONS in qml_modulesFawzi Mohamed2020-11-111-0/+5
| | | | | | | | | | maps qmake QML_PAST_MAJOR_VERSIONS to PAST_MAJOR_VERSIONS in cmake qml modules, introduced in qtdeclarative qmltyperegistrar: Add past-major-version option Change-Id: Ifbee7c87318cc9dc7d7961db80cad518e67ecffe Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add mapping for qtquick3d's assimp libraryAlexandru Croitor2020-11-111-0/+9
| | | | | | | | | | 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>
* configurejson2cmake: Follow up fix to a regressionAlexandru Croitor2020-11-101-0/+1
| | | | | | | | UnboundLocalError: local variable 'skip_special_case_preservation' referenced before assignment Change-Id: Ic7419e0bdd04a4251182d1a2616cd57e89e62432 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* configurejson2cmake: Allow skipping of special case handlingAlexandru Croitor2020-11-101-13/+23
| | | | | | | | Useful when cleaning up configure.cmake files that might have outdated content. Change-Id: I3872e81b7e896de83c1f6635499316bdbe3acb16 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Add handling of PLUGIN_EXTENDS for generic pluginsAlexey Edelev2020-11-091-0/+4
| | | | | | | | | | 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>
* CMake: Fix detection of the ltcg featureJoerg Bornemann2020-11-061-3/+4
| | | | | | | | | | | | | | | 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 96bdcdacbc0. Fixes: QTBUG-87874 Change-Id: I2b555bd1d7fbc8973e1d9493045c27d61b0d2c1b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Support QML_PAST_MAJOR_VERSIONSFabian Kosmale2020-11-061-0/+5
| | | | | | Change-Id: I47504d6c032c9a6ace7440580f0081cc5f254038 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake: Generate correct CONFIG_MODULE_NAME valuesAlexandru Croitor2020-10-301-7/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* CMake: Regenerate qtbase projectsAlexandru Croitor2020-10-301-0/+3
| | | | | | | | | | 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>
* CMake: pro2cmake: Handle CONFIG+=console app_bundle in examplesAlexandru Croitor2020-10-271-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* pro2cmake: Fix singleton declarationJoerg Bornemann2020-10-191-1/+1
| | | | | | | | The singleton modifier must be written without square brackets. Task-number: QTBUG-87684 Change-Id: I924bbf97789edd7f2b4f2b9bbca2cb99841d2906 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Rename add_qt_gui_executable to qt_add_executableAlexandru Croitor2020-10-191-1/+1
| | | | | | | | | | | | | | | | | | 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>
* CMake: pro2cmake: Handle qt3d library namesAlexandru Croitor2020-10-171-5/+11
| | | | | Change-Id: Iec582a3c066f64655ed533f8ef1bf0e2de0dc38c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>