summaryrefslogtreecommitdiffstats
path: root/cmake
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Fix path to qt-cmake in configure summaryJoerg Bornemann2020-07-091-1/+1
| | | | | | | The path was wrong if CMAKE_STAGING_PREFIX was set. Change-Id: Iec90c7a5edf0da80a0ac108fe3411c340c01e9a9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix qt-cmake-standalone-test when CMAKE_STAGING_PREFIX is setJoerg Bornemann2020-07-091-3/+3
| | | | | | | | | | The qt-cmake-standalone-test script is kind of a "host tool" and contained paths to CMAKE_INSTALL_PREFIX, which is wrong if CMAKE_STAGING_PREFIX points to somewhere else. Fixes: QTBUG-85336 Change-Id: I4828dc6868d55cfc60f3ad2199185230d5cc9028 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Introduce QT_STAGING_PREFIXJoerg Bornemann2020-07-092-10/+4
| | | | | | | | | | | Add the cache variable QT_STAGING_PREFIX that is the same as CMAKE_STAGING_PREFIX - if it's set, or CMAKE_INSTALL_PREFIX otherwise. Use the variable in the places where we check for the emptiness of CMAKE_STAGING_PREFIX to use CMAKE_INSTALL_PREFIX. Change-Id: I372d57dfa41818c1965b824c59ab3cac80b38f60 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix -pch configure optionJoerg Bornemann2020-07-081-1/+1
| | | | | | | This amends dbd3c759654. Change-Id: Ia87d60f1da65624bc5c6ffb915eecf99a2d8bdc0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Support the -rpath configure argumentJoerg Bornemann2020-07-081-0/+10
| | | | | | Task-number: QTBUG-85373 Change-Id: I04bdf307556aeab607a95d153cbe19254044c1f4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Support the -c++std configure argumentJoerg Bornemann2020-07-081-0/+4
| | | | | | Task-number: QTBUG-85373 Change-Id: I071c1d0c8bf96b34c5733d039b8a61e54e416800 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Support the -qtnamespace configure argumentJoerg Bornemann2020-07-081-0/+3
| | | | | | Task-number: QTBUG-85373 Change-Id: I3f995b31339a3c2b0c97ca806c652bc67846fc69 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Support mkspec-related configure argumentsJoerg Bornemann2020-07-081-0/+16
| | | | | | Task-number: QTBUG-85373 Change-Id: I44ae15b4c05f23442ac6b9d69d31f22f01d0a48c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Support -static, -shared and -framework configure argumentsJoerg Bornemann2020-07-081-0/+7
| | | | | | Task-number: QTBUG-85373 Change-Id: I0a1db7dcb4cb1738fa1ba0a687d41c5f5a613364 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Write EXTRA_RPATHS to qmodule.pri if QT_EXTRA_RPATHS is setJoerg Bornemann2020-07-071-0/+5
| | | | | Change-Id: Icd13cc047a9ca33f2ec9b6c2ce8216cbc4ae378b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Support configure -force_debug_infoJoerg Bornemann2020-07-061-0/+6
| | | | | | Task-number: QTBUG-85373 Change-Id: Ia798fc2cf715aed9157e1d9e2f64187c16e38bcf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Support build config-related configure optionsJoerg Bornemann2020-07-061-0/+21
| | | | | | | | | | This add support for the following options: -debug, -release, -debug-and-release. For the latter, the "Ninja Multi-Config" generator is auto-detected, if ninja is available. Task-number: QTBUG-85373 Change-Id: Ide0ca44e5f4c74657147e89d71e8d71c4f6a4c45 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Support -bindir, -libdir, -*dir configure argumentsJoerg Bornemann2020-07-061-0/+10
| | | | | | Task-number: QTBUG-85373 Change-Id: I0df181cb017561c3f0af5ab3fecb76008b89c0d2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Re-work configure flags for CMake generatorsJoerg Bornemann2020-07-061-5/+29
| | | | | | | | | | | | | | | | | Remove the -cmake-makefiles configure argument as its meaning was in essence "do not pass a -G argument to CMake". Instead, we add the following arguments: -cmake-generator <name> to pass -G <name> to CMake -cmake-use-default-generator to pass no -G argument to CMake If none of those arguments is given, we try to autodetect the generator. If a ninja executable is found, we prefer the Ninja generator. On Unix we fall back to "Unix Makefiles". On Windows, we do a poor man's compiler detection and select one of "NMake Makefiles", "NMake Makefiles JOM" and "MinGW Makefiles". Change-Id: Ic36669bd50956d15fbc71cee73720732cd4bfab8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Teach configure.bat the -cmake argumentJoerg Bornemann2020-07-061-0/+115
| | | | | | | | | | | | | | | | | | | | | The configure scripts need to translate configure options to CMake arguments. It is not sensible to implement this translation twice, in sh and Windows batch language, so we're doing this once, in CMake language. The configure scripts write their options into config.opt and call a CMake script that reads config.opt, does the translation to CMake arguments and calls CMake to generate the build system. While we're at it, implement some more translations than the sh configure provided, like -extprefix, -top-level and -skip. Fixes: QTBUG-85349 Fixes: QTBUG-85350 Task-number: QTBUG-85373 Change-Id: Ida5d8b2a3c178b9349d41ec76d190c69a9456e74 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Don't propagate private defines for Qt header modulesAlexandru Croitor2020-07-051-7/+15
| | | | | | | | | | | | Interface libraries like our Qt header modules should not propagated private defines which are meant only for building a specific Qt module, and in the case of a header module there is nothing to build. Exclude the usual private defines we set in qt_add_module for header modules. This also fixes the content of header module .pri files. Change-Id: I0791ebdb73e8b020ddb8116433ed36c7b3d71303 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Fix non-prefix buildsAlexandru Croitor2020-07-021-1/+1
| | | | | | | | | | QT_WILL_INSTALL was set to ON, because an incorrect comparison was done. Amends 062318feb2d3b7598409c7e81e4459c2f4607764 Change-Id: I201aa2a183563ce05077c36ac2ba3bd61cc827c0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Write QT_CPU_FEATURES to qmodule.priJoerg Bornemann2020-07-023-1/+20
| | | | | | | | | | | To achieve this, we save the result of the subarch test in the cache variable TEST_subarch_result and use this value as the right hand side of the QT_CPU_FEATURES.xxx assignment. The Qt6HostInfo package now sets the variable QT6_HOST_INFO_SUBARCHS which will be used for the host_build scope in qmodule.pri when cross-building. Change-Id: I2c25f205bfc0692aef0d6f43ff4e542d27e1b948 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Limit OpenGL deprecation silencing on Apple platform to Qt itselfTor Arne Vestbø2020-07-022-5/+10
| | | | | | | | | | | | | | | | | | | | | Apple deprecated the entire OpenGL API in favor of Metal, which we are aware of, so we don't need to see the warnings when building Qt. Instead of applying the silencing globally for all Qt consumers, both internal and external, we now limit the silencing to Qt itself. That means user code that explicitly uses any of the deprecated APIs will see the warnings. Note that this does not apply to merely using any of the Qt OpenGL APIs. The user has to explicitly use the platform APIs that have been deprecated. The warnings need to be disabled on a build system level, so that that they are passed as -D flags on the command line. If the defines were done in Qt headers (qguiglobal.h e.g.), they would require the user to always include this header before any of the Apple headers. Change-Id: I3f2a2a5211332a059ad4416394251772c677fdcb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Document the mapping of configure options to CMake argumentsJoerg Bornemann2020-07-022-0/+163
| | | | | | | | | Add internal documentation how to map configure options to CMake arguments. This patch adds a markdown file with a giant table, and cmake/README.md links to it. Change-Id: I94a6a4ee24ed0114ccb3095d2c13cf5d84e2de72 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix non-prefix build detection when CMAKE_STAGING_PREFIX is setJoerg Bornemann2020-07-012-7/+25
| | | | | | | | | | | | | | | | It wasn't possible to create a cross, non-prefix build with CMAKE_INSTALL_PREFIX set to something else but the qtbase build dir and CMAKE_STAGING_PREFIX set to the qtbase build dir. This would be equivalent to configure -prefix /usr \ -extprefix ~/my/qtbase/build/dir Fix this by comparing the qtbase build dir against CMAKE_STAGING_PREFIX if it is set. We also have to adjust the QT_BUILD_DIR variable in a similar way. Change-Id: Iaba5cf0f6954ae4b15d8af1fc62634f5d7f68835 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix qconfig.cpp for cross-buildsJoerg Bornemann2020-07-011-21/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch modifies the two preprocessor definitions QT_CONFIGURE_HOSTBINDIR_TO_HOSTPREFIX_PATH and QT_CONFIGURE_HOSTBINDIR_TO_EXTPREFIX_PATH which are exclusively used by qmake (and not QtCore's QLibraryInfo) to determine the ext prefix and the host prefix. In the qmake build of Qt, qmake considers the host prefix as "location where qmake is installed". This is usually the same as the ext prefix but can be modified by the user at configure time. In the CMake build, we don't build tools for the host but always for the target platform. The QT_HOST_PATH is an external prefix we never install to. That means, the qmake we build is always installed into the ext prefix (CMAKE_STAGING_PREFIX or CMAKE_INSTALL_PREFIX). Therefore, we can calculate the path of <ext_prefix>/bin relative to <ext_prefix> and use this value for both, QT_CONFIGURE_HOSTBINDIR_TO_HOSTPREFIX_PATH and QT_CONFIGURE_HOSTBINDIR_TO_EXTPREFIX_PATH. The "path of <ext_prefix>/bin relative to <ext_prefix>" is equivalent to just the "path <prefix>/bin relative to <prefix>", meaning we can safely use <prefix>, which is just CMAKE_INSTALL_PREFIX. Task-number: QTBUG-84886 Change-Id: Ie1d4628a7049ddfd0d0a56dfe4ee2f2bb4952277 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Enable bitcode when targeting UIKIT aka iOSAlexandru Croitor2020-07-012-3/+23
| | | | | | | | | | | | | | | | | Building an iOS app with qmake failed because Qt itself was not built with bitcode enabled. Enable building with bitcode. Make sure qrc resource files and bundled 3rd party libraries also build with the regular Qt module flags and thus with bitcode enabled. As a consequence gc_sections has to be disabled for UIKIT platforms. Task-number: QTBUG-82581 Task-number: QTBUG-84781 Task-number: QTBUG-85240 Change-Id: I15fe668725a139c02f2a32a5db849b46d4ce325c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Use non-sanitized plugin type names in .pri filesAlexandru Croitor2020-07-011-2/+10
| | | | | | | | | | | | | | | This is required for qmake to correctly pick up and use plugins that have strange characters in the types (slashes for platforms/darwin type and dashes for wayland plugin types). This fixes some issues with trying to build an iOS application using qmake due to the qiosnsphotolibrarysupport plugin. Task-number: QTBUG-85240 Task-number: QTBUG-84781 Task-number: QTBUG-82581 Change-Id: I94faf2d3dbbdeb22dbd96dfb11c7bff00645b524 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Specify Prefix in target_qt.conf for non-prefix buildsAlexandru Croitor2020-07-011-0/+3
| | | | | | | | | | | | | | | | | The EffectivePaths section does not inherit the Prefix value from the Paths section. Specfiy it explicitly, otherwise the paths reported by qmake -query for /get variants ended up containing an extra "./bin/" part, which ended up breaking building iOS apps with qmake. Amends d7fd6848612760124871f0f3b55917250d078dd5 Task-number: QTBUG-85240 Task-number: QTBUG-84781 Task-number: QTBUG-82581 Change-Id: I288a6e76a21d779a7e03443777f8a4ce28df9974 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Use correct framework link flags in scripts and .pri filesAlexandru Croitor2020-07-013-5/+4
| | | | | | | | | | | | | | | | | | | | | target_link_libraries expects a quoted string like "-framework CoreFoundation" when linking frameworks and not 2 different arguments like "-framework" "CoreFoundation". Fix that in the FindWrapOpenGL and FindGLESv2 find modules. Make sure to not quote the framework link flags when generating .pri files even if there are spaces, otherwise building apps with qmake fails. Amends 7fcc9cf05500fd3a0a1ba5c2f90a8ad3bcd8e5b0 Amends 2ed63e587eefb246dba9e69aa01fdb2abb2def13 Amends 55a15a1c1b93d36d705fc69e44b5c806b807dd55 Amends 2a767ab4bb7de8c29d2a8365212244ed944e9aeb Task-number: QTBUG-85240 Change-Id: I66ba36760ad704d65e712072a528d9e25c336dfa Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix top-level .prl file generationAlexandru Croitor2020-07-011-20/+51
| | | | | | | | | | | | | | | | | | | | Promotes qt_find_package()'d targets and their transitive dependency targets to global scope. This will allow .prl file generation to access targets in a sibling repo scope. Retrofits qt_collect_libs() to be a bit more general, so it can be reused both for prl lib collection, and traversing of dependencies of qt_find_package() provided targets. Removes the bail out checks for top-level static builds. Amends 8c8c0f65e322f6599bfe0e7d0752c386f1275bd5 Amends dde11715d357f95370850f5e4eebebcbe7964fb3 Task-number: QTBUG-84874 Fixes: QTBUG-84917 Change-Id: Id95b4cb7a0887c52f35c40bfdb96ad4a68dd6794 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Adjust some status messages about syncqt and file generationAlexandru Croitor2020-06-303-4/+1
| | | | | | | | | | | Show a status message when we run syncqt for a module (gives a bit more insight into why the configuration seems to stall for a moment). Remove some uninformative messages about generating config.h files and Depends headers, etc. Change-Id: I5ff2774b9cf5d92ddde564dc09f4197c2835ee4a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Don't use libraries in /usr/local by default on macOSAlexandru Croitor2020-06-293-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qmake builds of Qt don't use libraries in /usr/local because the path is not considered a system path. Only the SDK path should be used as a source of system libraries. We should do the same for the CMake builds, which involves a couple of things. Tell CMake not to consider /usr/local (and a bunch of other paths) as system prefix paths. Disable pkg-config usage which by default is not used in qmake Windows and macOS builds. If a user wishes to use libraries located in /usr/local on macOS, they can explicitly enable the behavior via -DFEATURE_pkg_config=ON. In addition to enabling pkg-config, that will also disable the system prefix modification described above. Implementation notes To disable pkg-config usage, we set an empty path for PKG_CONFIG_EXECUTABLE, because there is no other good way. The downside to this is that a lot of warning messages will be printed that the pkg-config package can not be found. The pkg-config feature needs to be computed in QtBuildInternals before qtbase/src/configure.cmake, because it's too late to do it in that file where a few qt_find_package calls already exist. The feature value is also saved to QtBuildInternalsExtra, to make sure that pkg-config is disabled whenever building another repo. System prefix adjustment is done by removing paths from CMAKE_SYSTEM_PREFIX_PATH. Ideally we would remove also /usr as a path, to match what qmake does, but that breaks find_program() calls for perl, python, etc. We have to make sure that qt_find_package does not look in PATH when looking for packages, which is the default behavior, because PATH on macOS most likely contains /usr/local. One last curiosity for future generations is that CMake 3.18+ has merged a change to prioritise SDK locations over regular /usr/lib. Fixes: QTBUG-85261 Change-Id: I28fe5bae7997507a83b37b4eb1e0188e64062c57 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Generate qdevice.pri when cross-buildingJoerg Bornemann2020-06-293-0/+42
| | | | | | | | | | | | | This adds the CMake equivalent to the classical -device-option key=value configure argument: -DQT_QMAKE_DEVICE_OPTIONS=key1=value1[;keyN=valueN] The keys and values get dumped verbatim into qdevice.pri. This patch also ports the machineTuple configure test. Its result is written into qdevice.pri as value for the GCC_MACHINE_DUMP variable. Change-Id: I29f2323fd87639fafaed99ec7446c7ee75504705 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Allow to pass a custom target mkspec nameJoerg Bornemann2020-06-291-11/+14
| | | | | | | | It's now possible to pass -DQT_QMAKE_TARGET_MKSPEC=foo to cmake. If the value is not passed, then we will guess the mkspec like we did before. Change-Id: If6e8324654cb8bd83d3cba9eb6ee1e4ad2692a2c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Write host architecture and ABI to qconfig.priJoerg Bornemann2020-06-292-2/+19
| | | | | | | ...when cross-building Qt. Change-Id: I7d2fe83167fc278fde9f0c0fd70f5fa42fa62862 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Write gcc sysroot flags to qconfig.priJoerg Bornemann2020-06-291-15/+26
| | | | | | | | | | | | | For a cross-built, gcc-built Qt, the qmake build writes code into qconfig.pri that adds the --sysroot flag to compiler and linker flags. Follow suit in the CMake build. To keep the diff small between the qmake-generated and CMake-generated qconfig.pri files, the sysroot code is added at the top of qconfig.pri, which is the reason for the new 'content' string variable. Change-Id: I50649100e4368be64bf98ca19e46312e3ebf619d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Support cross-compilation with qmakeJoerg Bornemann2020-06-293-9/+104
| | | | | | | | | | | | | When cross-compiling, we now create a target_qt.conf file that's to be used with the host Qt's qmake. With "qmake -qtconf .../target_qt.conf" projects can be cross-built against the cross-built Qt. We also create wrapper scripts for the host qmake to save the user from passing the -qtconf argument. Fixes: QTBUG-82581 Change-Id: Ib5866e7e820369efea9eb3171e3e3e3ca5c0c3c1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix double-negation of feature CONFIG valuesJoerg Bornemann2020-06-291-1/+5
| | | | | | | | | The plugin-manifests feature has the "negative" CONFIG value "no_plugin_manifest". On negation, we're supposed to strip off the leading "no_" instead of adding another one. Change-Id: Id2c66da41f22881272d5b923f12b85d9fcc2c9d0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Mark all find_package(PkgConfig) to be quietAlexandru Croitor2020-06-2921-21/+21
| | | | | | | | | This reduces the amount of warning messages when the pkg-config feature is disabled. Task-number: QTBUG-85276 Change-Id: I11a6dfb6273a1e48c47d1ef5c1a5f70ba990fbc0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Transform absolute library paths into link flags in .pri filesAlexandru Croitor2020-06-292-3/+106
| | | | | | | | | | | | | | | | | | | | | | | Before this change, the qt_lib_foo_private .pri files contained absolute paths to libraries, e.g. /usr/lib/x86_64-linux-gnu/libcups.so Whereas the qmake build instead embeds link flags like -lcups. Detect absolute library file paths, and transform them into link flags. This should make the .pri files relocatable. Fix the add_custom_commands to have the scripts as dependencies. Make sure to pass the suffix, prefix and other options to the qconfig.pri generation command as well. Also reverse the order of the link flags, to mirror the order that qmake generates for .pri files. Task-number: QTBUG-84781 Task-number: QTBUG-85240 Change-Id: I7bc3b234d9c86c785b169b11f3042450aa225c1f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: WrapOpenGL target should also link AGL on macOSAlexandru Croitor2020-06-291-0/+9
| | | | | | | | | | This is consistent with the qmake mkspec in common/mac.conf Task-number: QTBUG-85240 Task-number: QTBUG-84781 Change-Id: I99df365a3be541356482d29eda806020f4e298d9 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Create a Find module wrapper for OpenGLAlexandru Croitor2020-06-291-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | Our .prl files embedded an absolute path to the OpenGL.tbd file. This obviously breaks their usage when used on another machine when no SDK exists. To fix that we need to use a "-framework OpenGL" linker flag instead of linking against the absolute path library. To convince CMake to do that, we have to create a wrapping OpenGL target which sets an appropriate INTERFACE_LINK_LIBRARIES property. So create a FindWrapOpenGL find module to do that on darwin platforms. Adjust helper.py and our build system to use it. This tangentially amends 38cd18384f6198c5bc3ea1da9ffc0158e960a778 because it recreates the FindWrapOpenGL module, but for a different purpose. Task-number: QTBUG-85240 Task-number: QTBUG-84781 Change-Id: I3498c19157ae31db5099e6edfb9d71490187f1d3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Let qt_copy_or_install set the executable bit for PROGRAMSJoerg Bornemann2020-06-281-1/+20
| | | | | | | | | | | | In a prefix build, this function uses install(PROGRAMS) which correctly sets the executable bit. In a non-prefix build, we did file(COPY) without explicitly setting executable permissions. Now, we're also setting the executable bit for qt_copy_or_install(PROGRAMS) calls in non-prefix builds. Change-Id: I283e9aeed2a23016ee196d83d584a7eaaa5edd66 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Create Qt6HostInfo packageJoerg Bornemann2020-06-282-0/+34
| | | | | | | | | | | | This package is supposed to be loaded when cross-building Qt from the host Qt installation prefix. It provides information about the host Qt by setting various variables. The information reflects what "qmake -query" of the host Qt would return. All provided variable names begin with "QT6_HOST_INFO_". Change-Id: Id568923a318d6e3b48c450663519a3727f615a8f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Display found information in some of the Find modulesAlexandru Croitor2020-06-2611-0/+31
| | | | | Change-Id: I5d92f2f1a552888361a2939577c2b0177c62b596 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix some incorrectly included FindPkgConfig modulesAlexandru Croitor2020-06-264-4/+4
| | | | | | | | This gets rid of a few warnings during configuration. Task-number: QTBUG-85276 Change-Id: I07d2fdfd8d3f81f1d780528ee6350e1a3ded9523 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Make more inner find_package calls quietAlexandru Croitor2020-06-264-6/+6
| | | | | | | Task-number: QTBUG-85276 Change-Id: I8ed84e2f2cdaf90224452a5e5a549791574edc15 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Add meta-target host_tools to easily build just the toolsAlexandru Croitor2020-06-262-0/+14
| | | | | | | | | | | A developer could write 'ninja host_tools' to build the qtbase tools and their dependencies, and then configure another cross-compiling build dir pointing to the previous host build. This shortens the workflow for cross-building when working in qtbase. Change-Id: I69e70d23ce9df8669bcadf326d0586f097e5cb21 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix framework handling for .pri filesAlexandru Croitor2020-06-261-1/+5
| | | | | | | | | | | | | | | | | | | | | | | Rather than embedding the full absolute path to the framework, we should instead write a -framework Foo flag. qmake seems to do this by specifying QMAKE_LIBS_FOO in the mkspec. We'll try to get away with just deriving the name of the framework from the path, to avoid having to introduce a mkspec equivalent mapping for CMake. This doesn't currently handle framework include paths, which qmake also handled by harcoding QMAKE_INCDIR_FOO in the mkspec, and then sysrootifying it via mkspecs/common/mac/sdk.prf. Hopefully that's not really needed, given that -framework flag should imply include paths as well. Somewhat partially amends c254254c55b24dd0653331e025cdfdbbdcca2a56 Task-number: QTBUG-85240 Task-number: QTBUG-84781 Change-Id: I70ea5021422d7b1f5afa9c4a595d1a9b8a8217d3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* cmake: Pick up custom Info.plist in user projectsTor Arne Vestbø2020-06-261-2/+2
| | | | | | | | We can't rely on the MACOS define as that's set by our private QtPlatformSupport.cmake that's not shipped. Change-Id: I86c578a282a0833408a06d923954510a3579bdaa Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Match tense of other log outputTor Arne Vestbø2020-06-261-1/+1
| | | | | Change-Id: Ied164c97bd54f6b37450d7a2cf8225ee5190ce17 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Apply symbol visibility settings to Objective-C/C++ sourcesTor Arne Vestbø2020-06-252-0/+8
| | | | | | | | | | | | | | | Otherwise the Objective-C++ sources will be built with the default compiler visibility (visible), and then linked with moc-generated C++ sources that have the Qt overridden hidden visibility, resulting in linker warnings such as: ld: warning: direct access in function 'X' from file 'moc_foo.cpp.o' to global weak symbol 'Y' from file 'bar.mm.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility setting Change-Id: I22e15e7e181a74de8c0a22c73d06e600e582d7fd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Place framework .prl files under ResourcesAlexandru Croitor2020-06-251-0/+8
| | | | | | | Adapts to qmake's 74abe983204dab35dcce59001308c54d34ad2c02 change Change-Id: If1d6ce063d53dda4835a224661a16219cf9a9476 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>