summaryrefslogtreecommitdiffstats
path: root/cmake
Commit message (Collapse)AuthorAgeFilesLines
* Fix building examples when doing a Qt static buildAlexandru Croitor2019-07-221-1/+11
| | | | | | | | | | | | | | | | | | The build failed due to two different reasons. We tried to assign properties on an aliased target, which does not work. Make sure to set properties on the original unaliased target. We tried to query for the value of the QT_DEFAULT_PLUGINS property when automatically linking to plugins, but the generator expression failed in the AND section, because querying for an unexisting value does not return an integer, and the AND expression expects an integer. The fix is to wrap the relevant expression in a BOOL generator expression. Change-Id: Ia065bc1de939cee49e5de0b2aef70e356cc5419a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Fix warnings regarding QML pluginsAlexandru Croitor2019-07-221-3/+5
| | | | | | | | | | Some author warnings don't make sense when dealing with QML plugins, like the messages regarding CLASS_NAME or not belonging to a certain module. Take care not to print those warnings in those cases. Change-Id: I017bd63cca650dc262337949242e813b7b6a56cc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix non-prefix builds for non qtbase reposAlexandru Croitor2019-07-222-9/+21
| | | | | | | | | | | | | | | | QT_WILL_INSTALL was previously always set to ON when doing a qtdeclarative build, because CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT evaluated to false due to always having to set CMAKE_INSTALL_PREFIX to point to the qtbase build directory. Instead of recomputing the value of QT_WILL_INSTALL, compute it once while configuring qtbase, and add it to the generated QtBuildInternalsExtra.cmake file, so it propagates to all other repos that will be built. Change-Id: If8bf63e7501b5758fe7aa0f799cb0746704f4811 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Simplify add_qml_module codeLeander Beernaert2019-07-221-48/+154
| | | | | | | | | | | | | | | | Reduce the amount of code required to add a qml plugin to cmake by making add_qml_module wrap the add_qt_plugin code where required. add_qml_module will also create a dummy target so that qml files will appear as source files in an IDE when no cpp files are present. CXX_MODULE qmake parameter has been dropped in favor of an explicit IMPORT_VERSION parameter, since it was only used to determine the version when the IMPORT_VERSION was not specified. Change-Id: I4a4b626566720d04c62d246ca521db8c4a95b10f Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Handle TESTDATA for Qt TestsLeander Beernaert2019-07-161-3/+51
| | | | | | | | | | | | | | | | These changes enable the support to handle test data and install or package them as resources when appropriate. This change does not handle the GENERATED_TESTDATA or TEST_HELPER_INSTALLS since there are very few occurrences of these and we can handle those as special cases. Finally, in add_qt_test, only append CMAKE_CURRENT_SOURCE_DIR if the path is not absolute. Change-Id: Ic20b9749d10e2a09916f2797606116471c64850b Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add support for QML pluginsLeander Beernaert2019-07-151-3/+142
| | | | | | | | | | | | | | | | | | Add the necessary code to both the QtBuild and pro2cmake to be able to handle qml plugins in qt declarative. Add condition replacement for QTDIR_build to QT_BUILDING_QT so that certain qml examples work correctly when being built in the build directory. Fix add_qt_resources not being updated during build after changes were made. Files list used as dependencies were not populated. Add missing module mappings for qtdeclarative. Change-Id: I0f71d0a3a0e7e97ba96807950d11cffaee04d9b2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Fix CMake moc scanner to look for new macro Q_NAMESPACE_EXPORTAlexandru Croitor2019-07-111-0/+7
| | | | | | | | | | | | | | f66c1db16c050c9d685a44a38ad7c5cf9f6fcc96 in qtbase introduced a new macro that the moc scanner has to look for. Set an explicit list of macros to look for in the CMAKE_AUTOMOC_MACRO_NAMES property of every target that has AUTOMOC enabled, otherwise CMake AUTOMOC won't run moc on files that contain the new macro. Change-Id: Id991a70d773cef66716621803a88e96b44a80650 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: implement default qpa plugin behavior for static buildsJean-Michaël Celerier2019-07-053-10/+30
| | | | | | | | | | | | | | | | | This is done by adding a DEFAULT_IF argument to add_qt_plugin, which accepts if-evaluated expressions. e.g. add_qt_plugin(myplugin DEFAULT_IF ${foo} STREQUAL ${bar} ... ) so that this mechanism can be reused later if necessary. Change-Id: I7eba9adaaa28e55a4f0f94cf206e868b990027e6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: allow client apps to load static plug-insJean-Michaël Celerier2019-07-053-18/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | Based in part on Kyle Edwards's implementation : https://codereview.qt-project.org/c/qt/qtbase/+/243731 Example : ``` cmake_minimum_required(VERSION 3.15) project(foo) add_executable(foo main.cpp) find_package(ICU COMPONENTS i18n uc data REQUIRED) find_package(Qt6 COMPONENTS Core Gui REQUIRED) target_link_libraries(foo Qt6::Core Qt6::Gui) qt_import_plugins(foo INCLUDE Qt6::qxcb EXCLUDE Qt6::qgtk3 Qt6::qeglfs-kms-integration Qt6::qjpeg ) ``` Change-Id: If7736c42f669f7d7f43052cae59c28fc7fcb4156 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix toolchain path when doing non-prefix buildsAlexandru Croitor2019-07-031-0/+7
| | | | | | | | | | | Previously the cmake install prefix was added twice during a non-prefix build, which evaluated to an incorrect path. Set another absolute dir variable, and use that instead. Change-Id: I73099510dadc8f401d5a763f21840c9671686c10 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Add auto detection routines for androidLeander Beernaert2019-06-273-1/+64
| | | | | | | | | | Add QtAutoDectect cmake which has routines to handle the vcpkg detection as well as set up some android configuration parameters. The latter will contribute towards keeping the cmake configuration commands shorter when targeting android. Change-Id: I721291c8dce39b5c298565a46867ddcab2df90e8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Update README for other Android architecturesLeander Beernaert2019-06-271-1/+10
| | | | | | | | Update the cmake README file with explanations on how to target the other available Android architectures. Change-Id: Id7653abc4a1a6fbb96797014ce2ca2e6bb49943d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Prospective fix for using qt-cmake when %PATH% changes and using NinjaSimon Hausmann2019-06-261-0/+5
| | | | | | | | | Mixing compilers won't work well on Windows, so if qtbase is built using cl.exe and Ninja and then later cmake is called on another module and gcc is found in %PATH%, then cmake will prefer that. Let's avoid that. Change-Id: I8294482939efa6a16e0a4df8df3aeef8243c3657 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix error in run_config_test_architectureLeander Beernaert2019-06-261-1/+1
| | | | | | | | | The run_config_test_architecture() function in QtBaseConfig was not working correctly as we were not updating the length of the line properly. Change-Id: I29c5b45f1fa36d16cb2ef00950feb80987f6b176 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix osx deployment target and sysroot propagation in the qt toolchainSimon Hausmann2019-06-262-0/+12
| | | | | | | | | We need to save them in the toolchain file, otherwise we can't compile anything :) Change-Id: Ic5c53524fa4aa05d0b3229c2905dff92ca437ec1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* Android: Final changes for APK generationLeander Beernaert2019-06-265-1/+231
| | | | | | | | | | | | | | | | | | | | Generate the ${MODULE}-android-dependencies.xml for the androiddeployqt tool. This will ensure all the right plugins and dependencies are packaged when generating the apk. This change also changes the visibility for executable to default/public. Not having this will cause the application to crash as we can't locate main() in the executable (shared library). Additionally pro2cmake conversion script has been updated to perform the required conversions for the Android settings. Finally, the 6 projects in QtBase that have Android dependencies have been updated with the new script and the step that produces the xml files in run at the end in QtPostProcess.cmake. Change-Id: I9774ba1b123bc11cae972fa37054ef2c51988498 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add windows batch file for convenient cmake invocation with Qt toolchain fileSimon Hausmann2019-06-251-0/+3
| | | | | | | | | Similar to the shell script, this makes it easier to invoke cmake by just extending your PATH. Change-Id: I1f83e93c507032f6ecf4838c11d62f49f4d93ed6 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Allow prefix builds with developer-build as feature enabledSimon Hausmann2019-06-252-10/+15
| | | | | | | Just like with qmake, separate the two "features". Change-Id: Idf2a796c7c4aaa740c471688b2221d7041fed643 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix building against an installed static QtSimon Hausmann2019-06-253-11/+13
| | | | | | | | | | | | | | | | For ICU we have multiple components, and ICU becomes a public dependency to QtCore. When storing the INTERFACE_QT_PACKAGE_COMPONENTS property, make sure to store the entire list of components, not just the first component -- by turning the semi-colon separated list into a space separated list. When processing the components at find_dependency time, we need to reverse that and pass COMPONENTS directly to ensure a correct parameter expansion. Change-Id: I24a0708520e7d5fba039395a151034aee4d4c0e2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Prepare tests for running in the CISimon Hausmann2019-06-251-2/+6
| | | | | | | | | | | | | | * Add labels so that ctest --print-labels and ctest -L <label> gives insight over the test plan and the ability to run easily individual tests. * Unfortunately we can't do the TESTARGS indirection for arguments as coin does with testlib, so instead pass the parameters to generate the xml unconditionally. Change-Id: I289de9c15c516e3ac3fe04771fdbd8d7a083ff1f Reviewed-by: Qt CMake Build Bot Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix vcpkg default target triplet setting in the qt toolchain fileSimon Hausmann2019-06-241-1/+1
| | | | | | | Due to scoping this variable needs to be written into the cache. Change-Id: I2704fe9ac138210571e0b7acada5eb5c65e265af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Check for the correct apple clang version with warnings_are_errorsAlexandru Croitor2019-06-241-1/+1
| | | | | | | | | | The current state of qtbase is confirmed to be built with no warnings when using up to Xcode 9.2, as per the check in mkspecs/features/qt_common.prf. Add the same check for the CMake build. Change-Id: I0c2409ece048e93fba29c41a8bd053dd112949bd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix tools dependencies in associated modules when cross-compilingSimon Hausmann2019-06-241-1/+4
| | | | | | | | | | | When cross-compiling we take a shortcut in add_qt_tool() for moc, etc. as the tools are already imported from the host build of Qt. However we must still add the tools as a dependency in for example QtCore so that when the cross-compiled QtCore is used, the host tools are implicitly imported. Change-Id: I83e4fd7f21e18472c0965c90c058dd2b55b6ec65 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix tools dependencies lookup when cross-compilingSimon Hausmann2019-06-241-0/+8
| | | | | | | | | | | When the host system uses 64-bits for pointers and the target 32-bits, then locating the tools dependencies would fail due to the mismatch. Since the tools dependencies don't create linkable targets but merely import executables, we can skip this check like in commit 914b367c7f6a117130b8a56338c46a8102a1f77f. Change-Id: I1ebd0867e4cce34f42df21dc8e8d9176a83a9cac Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Generate a toolchain and convenience cmake wrapperSimon Hausmann2019-06-242-0/+46
| | | | | | | | | | | | | | | | | This gets us a step into the direction of convenience that qmake offered: * QtBase is configured with a long command line (especially when cross-compiling) * Afterwards application developers (or other module builds) can just use qmake && make By generating a toolchain file we can capture vcpkg and toolchain chain-loading and a shell script can take care of providing the prefix path. Change-Id: Ided81f5432cab862306f2bea86cfe8e56adf71b0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix plugins on macOS to have the .dylib extensionAlexandru Croitor2019-06-241-0/+5
| | | | | | | | add_library(MODULE) creates libraries with .so extension on macOS, but Qt plugins should have the .dylib extension. Change-Id: I603e7abfb9d5b78c0c8ea526f9fe995bf36c3a50 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add PlatformCommonInternal target and QT_NO_DEBUG definitionAlexandru Croitor2019-06-242-2/+18
| | | | | | | | | | | | | | All the other PlatformModuleInternal, PlatformPluginInternal, PlatformToolInternal target will depend on the common one. Also add the QT_NO_DEBUG definition when the build type is not Debug. This fixes the lookup of the Qt platform plugin on macOS, which uses a "_debug" prefix in the plugin name depending on if the QT_NO_DEBUG definition is present or not. This is the same as it is done in mkspecs/features/qt.prf. Change-Id: I82cf461d44b8a3b3c5dc2b2d9f25baa246fc1e4b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix build with multi-config VS code generatorSimon Hausmann2019-06-211-0/+6
| | | | | | | | | | | | | | | | | | | We want our libraries to end up in the same bin directory, not inside the Debug\ or Release\ sub-directories. Their distinct names avoid a clash. For our tools such as moc, uic, etc. we need to place the release build into the bin directory explicitly, as by default multi-config generators place binaries into the Debug\ or Release\ sub-directory. This is also needed as cmake's automoc itself expects moc to be in the bin directory. One effect of this is that with a multi-config build, it is always necessary to perform a release build first, otherwise the debug build won't find moc/uic. Change-Id: I1361823ddf5961a5f1bb517e4bca69e621cbce9e Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add support for picking up vcpkg automaticallySimon Hausmann2019-06-201-5/+6
| | | | | | | | | | If VCPKG_ROOT is defined, let's use it and chainload any previously set toolchain file. The detection of vcpkg support via the VCPKG_ROOT environment variable is per vcpkg documentation, the automatic chainloading is something specific to us. Change-Id: I0498effc5b948f0b6f5e223d0454a15a0cbb503a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add support for vcpkg default target tripletsSimon Hausmann2019-06-201-2/+2
| | | | | | | | | | | | | As per vcpkg documentation, this is a tweak that allows respecting the vcpkg default target triplet environment variable, which simplifies the command line slightly. In order to make this also work for modules other than qtbase, we're going to need to consider the creation of a toolchain file. Change-Id: I2573f6644d671c710fd823df83e2205dbbfe19e6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* Fix QPA headers for QtPrintSupportSimon Hausmann2019-06-201-0/+3
| | | | | | | | | | | | | Remove the special case in QtGui and instead handle this in a generic way so that QtPrintSupport is covered, too. For now we do this in the same function where we run the regular target install() commands. It doesn't quite fit into per-target PUBLIC_HEADER or PRIVATE_HEADER properties as the qpa headers sit _next_ to public and private in a separate qpa sub-directory. Change-Id: I30aadaf9496cf0236f39a7c36a5163e4270edecc Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: clarify readmeFrederik Gladhorn2019-06-171-12/+20
| | | | | | | | | Always install - not installing doesn't make much sense. Add information about developer-build. Change-Id: I406d007e9b167ee83d126ffa6e78235743402c33 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* Add ICC platform specific mkspecJędrzej Nowacki2019-06-171-0/+2
| | | | | | Change-Id: I6d33439a251723c409d395b459207843804d295c Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-06-149-17/+17
| | | | | | | | | | This changes many different CMake places to mention Qt6 instead of Qt5. Note that some old qt5 cmake config files in corelib are probably not needed anymore, but I still renamed and kept them for now. Change-Id: Ie69e81540386a5af153f76c0242e18d48211bec4
* Revert "cmake: Make CMake superbuilds work"Alexandru Croitor2019-06-142-21/+14
| | | | | | | | | | | | | Builds fail on Windows, due to splitting on ':' on absolute file paths, when handling syncqt injections. Revert for now to get qt6 merge in faster. This reverts commit 7559d508d1993dd90a4939441eaf353d55462ae5. Change-Id: If139a8a1eb4ae7ccc8d7b835b12e83b03176e28b Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Qt CMake Build Bot
* cmake: Make CMake superbuilds workKevin Funk2019-06-142-14/+21
| | | | | | | | | | | | In case of a CMake superbuild, the actual install root in a non-prefix build is the top-level build directory (not $TOP_BUILDDIR/qtbase anymore). This is more in line how CMake lays out things by default. Task-number: QTBUG-75582 Change-Id: I4e1744b5c877508fedc33e237eec28cb7436010b Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Try to find Test package before calling add_subdirectory(src)Alexandru Croitor2019-06-131-1/+7
| | | | | | | | | | | in qt_build_repo(). This is important for qtdeclarative for example, which builds QmlTest functionality in ./src, and thus needs Test lib to be available. Change-Id: I84326d79844526f2f177c19de30bab0c858773e3 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Automatically find apple frameworks when building a repoAlexandru Croitor2019-06-131-0/+3
| | | | | | | | | Instead of doing it just in qtbase/src, we need to do it for all repos before building ./src. Change-Id: I57f226b849cd5370ffbbbea8a694697d400957a4 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* Fix the 'Fix static builds' commitAlexandru Croitor2019-06-121-1/+3
| | | | | | | | | | | | The GlobalConfigPrivate target should also be filtered out when registering target dependencies, because there's no standalone Qt5GlobalConfigPrivate.cmake file. Amends fbfa067a304e8aea6ba6719395fd12a05688b6f8. Change-Id: If89732bc2fd004b9644959f71339e22210483d7c Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix static buildsAlexandru Croitor2019-06-122-4/+9
| | | | | | | | | | | | | | | | | | | | | | There were a few issues: - Third party dependency info for plugins was not generated, because the depends and public_depends variables were not fetched. This caused issues when trying to use the qcocoa plugin in a consuming application, because Cups::Cups was not found. - Privately linked libraries in extend_target were not considered when generating dependency info for modules. This caused issues in QtThemeSupport, becauese it could not find Qt::DBus, due to that target only being added as a private library in a conditional scope. - Make sure to handle privately linked internal modules like PlatformModuleInternal to map to the Qt5 package, because there is no standalone package for it. Also remove a TODO comment that says that qt_register_target_dependencies should maybe be called in extend_target. That's already the case. Change-Id: Ie99c52e800cd89e6f82008f1e38f4da5cd602929 Reviewed-by: Qt CMake Build Bot Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Make WinMain linkage compatible with Qt 5Simon Hausmann2019-06-121-0/+5
| | | | | | | | | | | | | | | | | | | | In Qt 5, the Qt5Core target was extended by Qt5CoreConfigExtras.cmake to have a generator expression as interface linkage that would conditionally link WinMain. This patch implements the same through regular interface linkage right in corelib. Since the linkage happens through a generator expression, our dependency generator does not see this as a dependency. Therefore we add this as an unconditional package dependency for corelib, on Windows. In theory this could be done also in winmain's CMakeLists.txt, as targets can be extended outside of their directory. However this adds a directory id (WinMain:@<023423>) to the linkage, which mysteriously is not removed on the exported core target. Change-Id: If2abb9ba790f51274f582c9ec28c13d968b84302 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* Fix compiling of examples on AndroidSimon Hausmann2019-06-121-6/+6
| | | | | | | | | | | | | | | | | | | * Simplify add_qt_gui_executable() to not require WIN32/MACOSX_BUNDLE but provide it implicitly. It's redundant :) * When on Android, build a module (shared library), just like qmake. This requires an additional library destination in the install() call, but that's ignored on other platforms. * Fix typos in the android deployment generation settings function * Use the correct cache variable to determine whether we're inside a Qt build or not. Right now this only works inside Qt builds anyway as QtPlatformAndroid.cmake is not publically accessible. Change-Id: If1c763c31a7a83d0e0d854362ba7901657f63eb5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* Fix linking of examplesSimon Hausmann2019-06-123-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Provide add_qt_gui_executable() as function in our public API that takes care of automaticWinMain linkage. We can use this in the future to encapsulate similarplatform-specific behavior and adjustments, such as module generation onAndroid. In order for the examples to see the function in Qt5CoreMacros, three more additional fixes were required: * Do the build_repo_end() call _before_ attempting to build the examples, as we need the build_repo_end() to include QtPostProcess and complete the creation of all the target config files. Otherwise the find_package() calls in the examples see something incomplete. * Add more QT_NO_CREATE_TARGET guards * Always call find_dependency on the dependencies, regardless of the target creation mode. This way a find_package(Qt5 COMPONENTS Widgets) will still load Qt5CoreMacros. Change-Id: I03ce856e2f4312a050fe8043b8331cbe8a6c93e6 Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Prospective Windows build fixSimon Hausmann2019-06-121-6/+0
| | | | | | | | | | | Commit abe12f600b1f626c9d228ad5234c14784e7845f1 moved the _LARGEFILE64_SOURCE define to a central place and commit 449eee2d108589d2b8549d6682c8b5e792e659b8 made it conditional to UNIX (not WIN32). Somehow these two were left over though. Change-Id: I23b08e84db804e9d5a4dde706af501c0918b460e Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove redundant installation of QtPlatformAndroid.cmakeSimon Hausmann2019-06-121-8/+0
| | | | | | | | It's already installed right where QtSetup.cmake is installed. Change-Id: Ie88363ae3878cda8f92aa44160333886f64565d8 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: Generate deployment-settings.jsonLeander Beernaert2019-06-126-15/+272
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generate the android deployment settings json for android apk targets. QtPlatformAndroid is now also deployed as a public build dependency of QtCore. Some minor refactoring has been performed to the naming of variables and functions to better match the public facing apis. Extra settings for the file can be configured using the following target properties: set_target_properties(Core PROPERTIES QT_ANDROID_DEPLOYMENT_DEPENDENCIES "foo;bar" QT_ANDROID_EXTRA_LIBS "foo;bar" QT_ANDROID_EXTRA_PLUGINS "foo;bar" QT_ANDROID_PACKAGE_SOURCE_DIR "/foo/bar/" ) The file is generated using the function qt_android_generate_depoyment_settings(). We need to install the android template files and jar files during the android build as the androiddeployqt tool wont work if parts of it are split between the host install and the android install. Added QT_BUILD_QT variable to check whether we are building Qt from source. Finally, we also force the stdlib to shared via cmake configuration with -DANDROID_STL="c++_shared" Change-Id: I063c47e11749d56ba4c6f02101dbcc09e1b9fe87 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add appropriate MSVC version check for warnings are errors featureAlexandru Croitor2019-06-111-2/+6
| | | | | | | | | | In qmake land warnings_are_errors is only enabled for specific MSVC versions, ending with MSVC2015. Presumably the warnings have not yet been fixed for newer MSVC versions, so we stick with the same status quo for now. Change-Id: Idc3741d39c888f77ed324a5eb8c654416591785f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Don't add _LARGEFILE64_SOURCE define on WindowsAlexandru Croitor2019-06-111-2/+3
| | | | | | | | | | | | | | In qmake land, the largefile.prf feature is automatically loaded due to 'largefile' being added to CONFIG via the equivalent feature. The prf file is in the 'unix' subfolder though, which means that qmake doesn't load it on Windows. We need to do the same, otherwise we get build errors due to the define being checked in ZLIB headers, and selecting an invalid code branch on Windows. Change-Id: Ibe9202a639754927262bb8aaa28289934f2e23ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Handle minimal_syncqt as not running syncqt for nowAlexandru Croitor2019-06-071-2/+2
| | | | | | | | This is needed for QmlDevTools in qtdeclarative. Change-Id: I41adec15f292c91192e171b45d1e5d48764c37c4 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Change qt_build_repo to build tools if present and neededAlexandru Croitor2019-06-071-0/+6
| | | | | | | | | This is needed for qtdeclarative, to automatically start building the tools if needed. Change-Id: I3cbe129e8bb6fa8572a8e34fd3653b51727cb244 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>