summaryrefslogtreecommitdiffstats
path: root/cmake
Commit message (Collapse)AuthorAgeFilesLines
* Add support for MinGWCristian Adam2019-05-041-4/+26
| | | | | | | | | Tested with MinGW 7.3.0 64 from Qt 5.12 installation. The CMake 3rd party libraries I used from hunter project (with some package, and target names changes) Change-Id: Ie89555a6cd8bdb7182f9b2dd2c3c39784c523ead Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Handle generating find_dependency() calls for nolink targetsAlexandru Croitor2019-05-032-4/+24
| | | | | | | | | | | | | | | | Previously we just recorded that Gui has to link against Vulkan::Vulkan_nolink, but if an application consumed Gui, it wouldn't find that target. We need to record that if a module links against Vulkan_nolink, and then generate a find_dependency(Vulkan) call in the module config file. We also have to assign the _nolink interface library to an export (the Qt5 one), so that it gets installed as a target. Change-Id: Icbc29ff4161ab18fdd162196ae128e29c1ee8c80 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Generate config files with Qt:: prefixKevin Funk2019-05-034-1/+33
| | | | | | | | Generate CMake config files which export Qt targets with a Qt:: prefix (i.e. without a major version suffix in the namespace) Change-Id: Ia07f98be6d0e24c196e3880b7469f1f0c6232c06 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Install required CMake templatesKevin Funk2019-05-031-0/+3
| | | | | Change-Id: I4a56440bee1aa7143971dd8f0b8af6dc042703f3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Improve mapping of librariesTobias Hunger2019-05-031-0/+5
| | | | | | | | | | | | | Merge all data related to mapping libraries into one data structure in helper.py. Use that data for everything related to library mapping. This change enables way more features now like e.g. adding find_package calls into generated files. Change-Id: Ibbd2a1063cbeb65277582d434a6a672d62fc170b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: Make add_qt_executable workKevin Funk2019-05-031-0/+1
| | | | | | | | Also needs the include/ from the top-level binary dir added to the include path. Change-Id: I7e0d82a2ee24d9bf9ffe9da5fd02b3b223fd48e7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: move dependencies accumulation in QtPostProcess.cmakeJean-Michaël Celerier2019-05-034-29/+71
| | | | | | | | | This is needed because dependencies added after add_qt_module with extend_target are currently not taken into account. Task-number: QTBUG-75538 Change-Id: I2c72207fb88b2480e41a2c8550978fb194275617 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix finding host tools when cross-compilingSimon Hausmann2019-05-031-1/+11
| | | | | | | | | | | | | | | | | | | * When using a sysroot, just setting CMAKE_PREFIX_PATH to the QT_HOST_PATH is not sufficient in finding for example Qt5CoreTools because the QT_HOST_PATH would be prefixed by the sysroot. So this patch switches the mode to also enable looking outside of the sysroot. (done by Alexandru) * Once the Qt5CoreToolsConfigVersion.cmake was found, the built-in check for 32 vs. 64 bit compatibility by looking at the provided CMAKE_SIZEOF_VOID_P (4 when target is armv7 for example) and comparing it against the void* size used when building the tools would fail. Explicitly unsetting CMAKE_SIZEOF_VOID_P disables this check, and that's fine as we're not interested in any exported library targets -- where this could cause problems -- but merely programs to run. Change-Id: If2931dad023e39a3dbdaa17ac095131ad2c0ca60 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: make the qt_find_package PROVIDED_TARGETS optionalJean-Michaël Celerier2019-05-031-1/+1
| | | | | | | | | | This is because some FindPackage may produce some targets only on some platforms - e.g. qt_find_package(OpenGL) needs to define the provided target OpenGL::GLX which will only exist on linux but is required by various CMakeLists.txt files. Change-Id: I74515470f5d56c246f489df74901ad4223a92a70 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Fix typo, variable was renamed earlierKevin Funk2019-05-031-1/+1
| | | | | Change-Id: I8fe9da37572efe85b2dff0b223edb1d93e904f34 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update readme to mention how to set feature flagsAlexandru Croitor2019-05-021-0/+6
| | | | | Change-Id: If63d37af4711c4332129d65b934269c33f041ea4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: export locally-built dependencies in static buildJean-Michaël Celerier2019-05-023-1/+108
| | | | | Change-Id: Ifbcedd32cef3b9c8b4b8c9ca0d229850f696f406 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Make module package depend on its own tool packageAlexandru Croitor2019-05-024-2/+76
| | | | | | | | | | | | | | | | | | | | Also make the tool package depend on all tool packages that correspond to the qt module dependencies. So find_package(Qt5Widgets) implicitly calls find_package(Qt5WidgetTools). And find_package(Qt5WidgetsTools) will call find_package for Qt5GuiTools, and Qt5CoreTools. This enhances the user experience, so that in modules like qtsvg, you don't have to specify both find_package(Qt5Widgets) and find_package(Qt5WidgetsTools), but only the former. Or when cross building, you only need to specify Qt5WidgetTools, to get both Core and Gui tools. Change-Id: Ib1c5173a5b97584a52e144c22e38e90a712f727a Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Write find_dependency() calls in Qt Module config filesAlexandru Croitor2019-05-0212-6/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces a new function called qt_find_package() which can take an extra option called PROVIDED_TARGETS, which associates targets with the package that defines those targets. This is done by setting the INTERFACE_QT_PACKAGE_NAME and INTERFACE_QT_PACKAGE_VERSION properties on the imported targets. This information allows us to generate appropriate find_dependency() calls in a module's Config file for third party libraries. For example when an application links against QtCore, it should also link against zlib and atomic libraries. In order to do that, the library locations first have to be found by CMake. This is achieved by embedding find_dependency(ZLIB) and find_dependency(Atomic) in Qt5CoreDependencies.cmake which is included by Qt5CoreConfig.cmake. The latter is picked up when an application project contains find_package(Qt5Core), and thus all linking dependencies are resolved. The information 'which package provides which targets' is contained in the python json2cmake conversion script. The generated output of the script contains qt_find_package() calls that represent that information. The Qt5CoreDependencies.cmake file and which which dependencies it contains is generated at the QtPostProcess stop. Note that for non-static Qt builds, we only need to propagate public 3rd party libraries. For static builds, we need all third party libraries. In order for the INTERFACE_QT_PACKAGE_NAME property to be read in any scope, the targets on which the property is set, have to be GLOBAL. Also for applications and other modules to find all required third party libraries, we have to install all our custom Find modules, and make sure they define INTERFACE IMPORTED libraries, and not just IMPORTED libraries. Change-Id: I694d6e32d05b96d5e241df0156fc79d0029426aa Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Export tool config and target files for each relevant moduleAlexandru Croitor2019-05-028-47/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake will now generate config and target files for each module that provides tools. As a result, namespaced global targets such as Qt5::moc or Qt5::rcc can be made available. Third party projects that require just these tools, and not the Qt modules themselves, should specify CMAKE_PREFIX_PATH pointing to the installed Qt location, and call find_package(Qt5CoreTools), find_package(Qt5GuiTools), etc. It is also possible to call find_package(Qt5Tools REQUIRED Core Widgets) where the last option is a list of modules whose tools should be imported. Note that all the tools are in the Qt5:: namespace and not in the Qt5CoreTools:: or Qt5WidgetsTools:: namespace. This commit also changes the behavior regarding when to build tools while building Qt itself. When cross compiling Qt (checked via CMAKE_CROSSCOMPILING) or when -DQT_FORCE_FIND_TOOLS=TRUE is passed, tools added by add_qt_tool will always be searched for and not built. In this case the user has to specify the CMake variable QT_HOST_PATH pointing to an installed host Qt location. When not cross compiling, tools added by add_qt_tool are built from source. When building leaf modules (like qtsvg) that require some tool that was built in qtbase (like moc), the module project should contain a find_package(Qt5ToolsCore) call and specify an appropriate CMAKE_PREFIX_PATH so that the tool package is found. Note that because HOST_QT_TOOLS_DIRECTORY was replaced by QT_HOST_PATH, the ensure syncqt code was changed to make it work properly with both qtbase and qtsvg. Here's a list of tools and their module associations: qmake, moc, rcc, tracegen, qfloat16-tables, qlalr -> CoreTools qvkgen -> GuiTools uic -> WidgetTools dbus related tools -> DBusTools Task-number: QTBUG-74134 Change-Id: Ie67d1e2f8de46102b48eca008f0b50caf4fbe3ed Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Update readme with some useful infoAlexandru Croitor2019-05-011-14/+39
| | | | | | | | | | | Update required dependencies. Add section on how to build vcpkg on macOS. Fix some typos. Lower required CMake version. Inform how to bypass annoying ninja reconfiguration issue. Change-Id: Ia35bd4329c2cbb9857157cdc33b098f5adb04a35 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix add_qt_tool to properly propagate NO_QT optionAlexandru Croitor2019-04-291-2/+8
| | | | | | | | | | Otherwise add_qt_executable will still link against Core, and thus building qmake in a static build will fail. Amends a1752276e0f71f29df12317eaa81798ccbe2fa91 Change-Id: Iebbdf9d0a2808a9eaeffdf8fbdb44ff5e2920f3b Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: Do not link qmake against Qt (not even the bootstrap one)Tobias Hunger2019-04-291-5/+13
| | | | | | | | | | | | | Qmake should not rebuild all the code in QtCore, but currently it does. When linking against QtCore, all the symbols get duplicated. A clever linker will "deduplicate" the symbols again, so this actually works with shared Qt builds, but it fails for static builds. Do not rely on the linker being clever and just do not link Qt at all for qmake. Change-Id: I0f79ed9176a19ee884dd425e5f23c26cf69dc422 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Append syncqt header include dir when building pluginsAlexandru Croitor2019-04-261-0/+2
| | | | | Change-Id: I899d4562155fbc82cfd13979b424d751095a381b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix dbusxml2cpp custom command invocationAlexandru Croitor2019-04-161-5/+11
| | | | | | | | | | | | | Use absolute paths for source files, and relative paths plus a correct working directory for output files. This is required to work around a limitation of the dbusxml2cpp tool where it splits a command line option on a colon ":". Windows paths contain colons, and that breaks the internal logic of the tool when passing absolute paths. Change-Id: Ic653f1317ae4f68bb2f488c117fe48c34310c76e Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Work around issue of missing Windows qtmain static libraryAlexandru Croitor2019-04-161-0/+6
| | | | | | | | | | | | | | Applications that have the WIN32_EXECUTABLE property set, must have a WinMain function. In qmake's case, this function is provided by the qtmain static library. Until that is implemented in CMake land, disable the property on Windows for all qt executables. This fixes the linker issues while building examples. Task-number: QTBUG-75195 Change-Id: I323d4dd899f716cd6b9b7f4b5ecb76b22f462fc4 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: Use imported target to create _nolink targetsTobias Hunger2019-04-111-14/+12
| | | | | | | | | | Use an imported target to create _nolink targets. This gets rid of the need to have an helper target that gets aliases to get work around the problem of the original target might having a "::" in its name. Change-Id: I4618980cf2c673ebf5caca593bccf122b3c81480 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Update src/corelibTobias Hunger2019-04-111-1/+1
| | | | | Change-Id: I0321883f762460b146666bfbad0d8b27c3fdeadd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Support /nolink librariesTobias Hunger2019-04-101-0/+38
| | | | | | | | | | | | | Add a helper function to QtBuild that generates Foo_nolink versions of Foo library targets. Map 'Foo/nolink' libs found in qmake to Foo_nolink. Automatically run helper function to create _nolink targets as part of extend_target. Change-Id: I4c23ea68b3037d23c9a31d4ac272a6bd0565f7c0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Turn off linker version script support on macOSAlexandru Croitor2019-04-091-0/+7
| | | | | | | | The test erroneously succeeds on macOS with an XCode generator. Explicitly set the test result to be turned off. Change-Id: Id6fcb96f420f611517e81cc3697f1c88b508bd7c Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: FindATSPI2: Ignore repeated attempts to find ATSPI2Tobias Hunger2019-04-091-1/+3
| | | | | Change-Id: I4d6f59d144910d2f194f73e3b9bc8a5cc6726bcd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Stop installing test helpersAlexandru Croitor2019-04-081-1/+1
| | | | | | | | Tests and their helpers should only be used in the build directory. Change-Id: I5aa9fcf734b6b3667f91df7c84d083f944c452c9 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* cmake: Run tests from their build dirAlbert Astals Cid2019-04-051-1/+1
| | | | | | | It's what the qmake build does Change-Id: I99663735859941b56c2211898908d61bc6c4b48f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Put the test helpers binaries in their parent folderAlbert Astals Cid2019-04-041-1/+1
| | | | | | | | | | | | | | | Makes qtextcodec test succeed Like qmake does qt_test_helper.prf says " If an auto test needs a helper application, this helper should be put into the same directory as the test itself. " Change-Id: I02cb36d2237cdb72912c943250b843c33ffcd64a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Stop installing unnecessary thingsAlexandru Croitor2019-04-031-8/+17
| | | | | | | | | | This includes: - tests - tools that are only used duing the Qt build (tracegen and qfloat16-tables) Change-Id: I3a5f678682b5b9318012568a9e4dcdda0967f89b Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: Add FindCups.cmake from upstream cmakeTobias Hunger2019-04-031-0/+98
| | | | | | | | | This FindCups defines a target, which the FindCups.cmake in the currently required CMake version does not:-/ Change-Id: I76c5bb72ece80415db1971e4f2079682126fde36 Todo: Remove again once we depend on CMake 3.15. Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add a debug suffix to libraries and plugins on macOS and WindowsAlexandru Croitor2019-04-021-0/+8
| | | | | | | | | This is especially important on macOS when doing a debug build, because QPluginLoader is looking for the cocoa QPA plugin suffixed with "_debug" when executing a test or example. Change-Id: Ief23b3a82c567c16ab9dd30d04d1729031262d7d Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: Remove 3rdparty/kwin/FindFontconfig.cmakeTobias Hunger2019-03-291-50/+0
| | | | | | | The one shipped with cmake is more modern:-) Change-Id: I024769825467734ff1527e91df4cf5dfc38cbe68 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* Install test executables into $prefix/tests instead of $prefix/binAlexandru Croitor2019-03-271-0/+2
| | | | | | | | | The install path takes into account the path structure of the source directory, so that not all tests are bunched up into /tests, but rather /tests/auto/foo/bar. Change-Id: I5e32d2e41ae8f095f4eac6654973508efd598df0 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: Set QT_STATICPLUGIN for static pluginsTobias Hunger2019-03-271-4/+6
| | | | | Change-Id: I5439935b5db2babd47cdc85647e464fe845279cf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: allow custom plugin output/install directoriesTobias Hunger2019-03-271-11/+32
| | | | | | | | Only require TYPE if no OUTPUT_DIRECTORY, ARCHIVE_INSTALL_DIRECTORY and INSTALL_DIRECTORY is provided. Change-Id: I6db1cfaa576bfa3ee3dc8ecf81db20e3afcd61e2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix AUTOMOC and friends to run only once the tools are builtAlexandru Croitor2019-03-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | While building on macOS, AUTOMOC sometimes hanged indefinitely. The problem was that AUTOMOC was executed for the qmacstyle plugin before moc was actually built. Because of an upstream bug in CMake, AUTOMOC was caught in a deadlock without reporting that spawning the moc process failed. Specifically if a libuv spawn() call failed, the condition variable for a waiting thread was not notified, and the thread kept waiting forever for the process launch to finish. Fix the dependency by setting the AUTOGEN_TARGET_DEPENDS property on all targets that have AUTOGEN tools enabled. This makes sure that moc and friends are built before they are used. Also add some special cases to disable autogen tools on certain targets to break cycles between targets. Fixes: QTBUG-74636 Change-Id: I6e689e63cba1962525f169f332a58498d173c0a6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
* Revert "Fix wrong target in qt_feature_module_begin"Alexandru Croitor2019-03-221-1/+1
| | | | | | | | | | | It broke builds because the qconfig.h file was created in the wrong directory. This reverts commit 25f67fbb073c8bedf26e165f52abacf3e20a6a94. Change-Id: Ia458ef4193a3985a9ba613d82f679b7df5ca0107 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* Add MSVC specific instruction set compiler flagsAlexandru Croitor2019-03-211-0/+15
| | | | | | | | | This is only a half solution, because some of them need to be set based on the detected MSVC version and Windows kit, similar to how it's done by qmake. Change-Id: Ice13c99d6fe0a033ddfebf9d4be924dcd6b8a36c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix sub-architecture (instruction sets / SIMD) handlingAlexandru Croitor2019-03-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In qmake there are at least 2 things to know regarding sub-architectures and instruction sets. Which instruction sets does the compiler know to compile for, represented by the various config.tests and features in qtbase/configure.json. And which instructions sets are enabled by the compiler by default, represented by the configure.json "architecture" test and accessed via QT_CPU_FEATURES.$$arch qmake argument. Before this patch there was some mishandling of the above concepts in CMake code. The former can now be checked in CMake with via TEST_subarch_foo and QT_FEATURE_foo (where foo is sse2, etc). The latter can now be checked by TEST_arch_${TEST_architecture_arch}_subarch_foo (where foo is sse2, etc and the main arch is dynamyicall evaluated). The configurejson2cmake script was adjusted to take care of the above changes, and the cmake files were regenerated as well. Change-Id: Ifbf558242e320cafae50da388eee56fa5de2a50c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix wrong target in qt_feature_module_beginAlexandru Croitor2019-03-211-1/+1
| | | | | | | Presumably this was a copy paste that was not intended. Change-Id: I09e3bb12b3b3f7af75726d7a952d79814ea9c876 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix internal features to also be evaluatedAlexandru Croitor2019-03-211-3/+10
| | | | | | | | | | | | | This amends 4f1a155909dfcba7353ebe9eee669d65336bd943 and 37b154858f41c0aa32ad124878fae96c39563d39 which caused the regeneration of some json features to be internal. Some of those features were not evaluated any more unless they were referenced in another feature. Make sure to explicitly evaluate all internal features as well. Change-Id: I4367f309585fe29dc89d8a6b793de381956ae51d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: Make add_qt_executable link to Qt::Core by defaultTobias Hunger2019-03-201-2/+13
| | | | | | | | | | Make add_qt_executable link to Qt::Core by default. Add a BOOTSTRAP flag to disable this behavior again. Pass BOOTSTRAP on from add_qt_tool to add_qt_executable. Change-Id: I26e7f1e03254122f626b3765cccc0dc4414a4fc0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Handle INSTALL_DIRECTORY for qt_executablesTobias Hunger2019-03-201-1/+9
| | | | | | | Allow to override the install directory for Qt executables. Change-Id: I9561976eefe9c7b573bb97ddaaa39e30d3b6d9fb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix names for generated DBus adaptor/interface filesTobias Hunger2019-03-201-1/+16
| | | | | | | | | Use the same names for DBus adaptor/interface files that are also used by qmake. E.g. io.qt.something.xml will be turned into something_interface.(cpp|h) or something_adaptor.(cpp|h). Change-Id: I799b8aee7addd1fe590e8f3ec078e5325b68d5b1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Treat OUTPUT_DIRECTORY as relative to top level build directoryTobias Hunger2019-03-201-0/+3
| | | | | | | | Treat a relative path in OUTPUT_DIRECTORY as relative to the top level build directory, not to the current build directory. Change-Id: I4d409d1362a8f73d13b93cf5ab98e82e60dd62cb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add windows platform plugin and its requirementsAlexandru Croitor2019-03-181-1/+2
| | | | | | | | | | | | | - executed pro2cmake script on windows qpa plugin - added windowsuiautomation platformsupport project - fixed plugin dlls and lib files to be written to the same path - fixed an issue comErrorString which used implicit casting from QString to char*, but plugins are currently built with QT_NO_CAST_TO_ASCII Task-number: QTBUG-74140 Change-Id: I5db3b6c5264bbd5dfba2998b049fda36eb312c70 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix Windows buildAlexandru Croitor2019-03-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | - Fix qmake build - Fix QtNetwork moc-ing, by including the moc files inside the cpp files - Fix sql odbc plugin by including QT_PLUGIN define - Fix Boostrap to link against the Platform target, to get the correct Unicode and WIN64 defines. - Fix vulkan headers to be found - Fix freetype bzip and png unresolved symbols / linker issues when building minimal platform plugin (also need to make sure to use the vcpkg toolchain instead of CMAKE_PREFIX_PATH because then find_package is overridden, which does magic to properly propagate static library dependencies). - Fix qfilesystementry test not to be built without private tests feature (it led to undefined symbols issues). - Make sure to remove QT_NO_CAST_TO_ASCII define when building QtCore, so that the qstringbuilder3 test builds successfully. Task-number: QTBUG-74140 Change-Id: I353d08392b604d55f8e62cdd8696d1e19a3c084a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Do define generation after feature evaluationAlexandru Croitor2019-03-181-18/+40
| | | | | | | | | | | | | | | | | | | Instead of generating defines guarded by feature ifdefs, record the define information (condition, name, value, etc), and generate the final define statement only if the feature condition evaluated to true. This removes the need to generate feature defines (QT_FEATURE_foo) for features that have neither public nor private outputs in the configure.json file. Also note that all qt_feature_definition() calls (which correspond to type:"define" outputs in json files) now generate defines only in the public header, which seems to be consistent with how qmake evaluates json files. Change-Id: I5210b405d5735dd9df5f7a55d1ea9547bb7b1159 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Add QT_CFLAGS_* when building x86simd testsTobias Hunger2019-03-182-7/+7
| | | | | Change-Id: I5caa088d517cb9d3749c3ed8ef88a41552c1d340 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>