summaryrefslogtreecommitdiffstats
path: root/cmake/QtPlatformSupport.cmake
Commit message (Collapse)AuthorAgeFilesLines
* QtPlatformSupport: add support for detecting webOSJanne Juntunen2022-03-211-0/+4
| | | | | | | | | | Some autotest CMakeLists.txts need to know whether the target is webOS. This change enables that. Task-number: QTBUG-101933 Pick-to: 6.3 Change-Id: I7b4ebe89622a4ad8bc313e807d9fa50152c96d14 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: add support for GNU/HurdPino Toscano2022-01-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add a "HURD" CMake platform specification, so it can be properly checked in the build system. Set QT_DEFAULT_MKSPEC to the existing hurd-g++ mkspec. Hurd supports $ORIGIN in RPATH, so enable it. Hurd uses X11, so add it to the X11_SUPPORTED list. Enable few more feature checks that apply to Hurd as well: either because they are provided by GNU libc itself, or because they are implemented on Hurd. Check and set the ELF interpreter, as it is a common functionality of the GNU toolchain. Change-Id: Id347033560bbc5a2a4e2c3abb493c948c002b40e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Remove WinRT leftovers from build systemYuhang Zhao2021-12-181-2/+0
| | | | | | | Qt's WinRT support was removed long time ago. Change-Id: I60b220e970072c3450e3793862d6f68801d2b5b3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: remove support for building Qt with the old Intel compilerThiago Macieira2021-10-131-1/+0
| | | | | | | | | | | | | | | | | | This hasn't worked for some time. It's not in our CI and I don't think it was working at all. When I tried to build it, I ran into several problems with C++17 and an Internal Compiler Error I did not have any interest in working around. After discussing with the Intel compiler team, it was decided that fixing those issues in the old compiler is not going to happen. Instead, their recommendation is to adopt the new LLVM-based compiler, which the last commit added support for. This commit does not remove qmake support for the old ICC. It's possible someone is using qmake with a non-Qt6 project and ICC. Change-Id: Icb2516126f674e7b8bb3fffd16ad6350ddbd49e5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: add support for Intel's LLVM-based compilerThiago Macieira2021-10-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes a few cleanups to our .cmake files where it was easier to combine existing sections of Clang / AppleClang that no longer needed to be distinct. icpx could be replaced with a shell script: exec `basename $0`/clang++ --intel "$@" tst_qnumeric is not passing FAIL! : tst_QNumeric::classifyF() Compared values are not the same Actual (qFpClassify(tiny / two)): 2 Expected (FP_SUBNORMAL) : 3 Loc: [/home/tjmaciei/src/qt/qt6-icx/qtbase/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp(344)] FAIL! : tst_QNumeric::classifyD() Compared values are not the same Actual (qFpClassify(tiny / two)): 2 Expected (FP_SUBNORMAL) : 3 Loc: [/home/tjmaciei/src/qt/qt6-icx/qtbase/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp(344)] FAIL! : tst_QNumeric::floatDistance(denormal) Compared values are not the same Actual (qFloatDistance(from, stop)): 0 Expected (expectedDistance) : 4194304 Loc: [/home/tjmaciei/src/qt/qt6-icx/qtbase/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp(408)] FAIL! : tst_QNumeric::doubleDistance(denormal) Compared values are not the same Actual (qFloatDistance(from, stop)): 0 Expected (expectedDistance) : 2251799813685248 Loc: [/home/tjmaciei/src/qt/qt6-icx/qtbase/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp(408)] P Change-Id: Icb2516126f674e7b8bb3fffd16ad59431e8c3379 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add Solaris support in cmake buildNiclas Rosenvik2021-04-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add SOLARIS cmake platform definition. Add settings for QT_DEFAULT_MKSPEC so that qplatformdefs.h can be found. Solaris has its gssapi symbols in libgss. Solaris supports @ORIGIN. Solaris ld does not support --dynamic-list needed for reduce relocations. Make solaris fail the reduce relocation test. getauxval is specific to GNU libc and some other libc implementations on Linux but sys/auxv.h is not. The bootstrap uses sys/aux.h as the only indication for getauxval. This breaks builds on Solaris, so only make sys/auxv.h an indicator for getauxval on linux or glibc based systems. Solaris uses X11 so add it to the X11_SUPPORTED list. Solaris network libraries for sockets etc are in socket and nsl. ifreq does not have a member ifr_ifindex on Solaris, it uses ifr_index. Add test to check if ifr_index is a member of ifreq. The first struct in the in_addr union on solaris is defined as four uint8_t, therefore four arguments are needed for its initializer list. Change-Id: Ieed4c1bbac8559a7ae1db9c4e1e91f609f150270 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* wasm: add cmake build supportLorn Potter2021-04-011-1/+1
| | | | | | | | | | | | | | | | A few configure defines get changed: QMAKE_WASM_PTHREAD_POOL_SIZE is now QT_WASM_PTHREAD_POOL_SIZE QMAKE_WASM_TOTAL_MEMORY is now QT_WASM_INITIAL_MEMORY QMAKE_WASM_SOURCE_MAP_BASE is now QT_WASM_SOURCE_MAP_BASE device-option EMSCRIPTEN_ASYNCIFY=1 is QT_EMSCRIPTEN_ASYNCIFY=1 To create source maps for debugging. use device-option QT_WASM_SOURCE_MAP=1 Task-number: QTBUG-78647 Change-Id: If9f30cd7fb408c386d6d69b5f7b1beecf1ab44b5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Properly set ICC and QCCNiclas Rosenvik2021-03-191-2/+2
| | | | | | | | | | | | | | | | | | Using CMAKE_C_COMPILER to match the compiler has its drawbacks. CMAKE_C_COMPILER can include the whole path to the compiler and directory names that incude icc, icl or qcc also match even if the compiler is not icc or qcc. Icc has the compiler id Intel according to the CMake documentation. The compiler id for qcc is QCC according to CMake policy 0047, and this is set to new since Qt requires CMake to be above 3.0. Change-Id: Iceb428ed10f0f5bbaa19ec2d883da186c85e7a73 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: James McDonnell <jmcdonnell@blackberry.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add additional info which was missing in qconfig.priAlexandru Croitor2020-06-171-0/+1
| | | | | | | | Mostly compiler version numbers. Task-number: QTBUG-84781 Change-Id: I10e92fdfd4e603c9b763a51a0e09b6c4a2c75ac7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* cmake: Remove APPLE prefix from platform namesTor Arne Vestbø2020-03-161-5/+5
| | | | | | | None of the other platforms have it. Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Fix naming when referring to Apple macOSTor Arne Vestbø2020-03-161-1/+1
| | | | | Change-Id: Iafb5e448d0d65d42f788464fc600594a5666f9af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add initial support for cross-building to iOSAlexandru Croitor2019-12-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | Tested locally with the following configurations: - iOS device builds (arm64) - iOS simulator builds (x86_64) - iOS simulator_and_device builds (fat arm64 and x86_64 archives) All iOS builds currently require a custom vcpkg fork which contains fixes for building the required 3rd party libraries. qtsvg, qtdeclarative, qtgraphicaleffects and qtquickcontrols2 have also been tested to build successfully. simulator_and_device builds are also supported, but require an umerged patch in upstream CMake as well as further patches to vcpkg. Task-number: QTBUG-75576 Change-Id: Icd29913fbbd52a60e07ea5253fd9c7af7f8ce44c Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* Rename / prefix all our private API functions with qt_Alexandru Croitor2019-11-141-23/+23
| | | | | | | | | | | Rename internal APIs like extend_target to qt_extend_target. Prefix apis with qt_ where required. Keep old names for compatibility until all their usages are removed. Change-Id: I9a13515a01857257a4c5be3a89253749d46a4f41 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix WASM platform detectionSimon Hausmann2019-08-301-1/+1
| | | | | | | | | At the moment we only support building with Emscripten, so that's the system name to look for. Change-Id: I08782ed0201da1593058bf1fb2ec61d6660802ed Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: Move Platform IncludeLeander Beernaert2019-06-061-4/+0
| | | | | | | | | Move the include of the platform from QtPlatformSupport to QtSetup. This no longer causes compile tests to fail since they expect explicit include paths instead of using CMAKE_MODULE_PATH. Change-Id: I9d3bed7845104d84422afb5a976ec14b111d259d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Android: SDK SupportLeander Beernaert2019-06-051-0/+4
| | | | | | | | | | | | | | | Enable building androiddeployqt when performing host builds only. Added QtPlatformAndroid.cmake to locate Java and the setup the android SDK platform when building on android. Install the androiddeployqt support files when performing a host build. Added ANDROID_SDK_ROOT configuration variable for specifying the android sdk directory. Generating the deployment-settings.json will be done in another change. Change-Id: I1bf15315af4ed904d2fb1d22b0e8e834df32d6ed Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix build with clang 8.0Simon Hausmann2019-06-041-1/+3
| | | | | | | | | | | | | When qt_parse_version_string tries to parse the compiler version into separate fields, it tries to accommodate for different number of digits separate by dots by checking the length of the list as it is mutated. Unfortunately the length variable is not a live variable, so after removing an entry from the list we must change the length variable manually. Change-Id: Ieaeb091581484e8c723fbb467697f73036e64ec9 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Handle a few more condition types in pro2cmakeAlexandru Croitor2019-06-041-0/+39
| | | | | | | | | | | | | | | | qtdeclarative has a few conditions that check the gcc version via variables like QT_GCC_MAJOR_VERSION. To handle that, parse the CMake compiler version using qt_parse_version_string() into separate variables like QT_COMPILER_VERSION_MAJOR, QT_COMPILER_VERSION_MINOR and QT_COMPILER_VERSION_PATCH. We can then map the conditions appropriately. Also, handle isEqual(foo, bar), which is equivalent equals(foo,bar). Change-Id: I74575c733b44f1f42451e00038b3f113fd353915 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix Android buildSimon Hausmann2019-06-031-2/+0
| | | | | | | | | | | | | Do not set ANDROID_EMBEDDED unconditionally, as that for now is the least likely configuration and it won't compile when the sysroot is real Android. If this gets revived, then it can be done by setting ANDROID_EMBEDDED in the cache file directly via the cmake command line. Change-Id: Ic1e1731f981414bd90b89fe91eaf0543a87d8c88 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add QT_CFLAGS_* when building x86simd testsTobias Hunger2019-03-181-0/+1
| | | | | Change-Id: I5caa088d517cb9d3749c3ed8ef88a41552c1d340 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Begin port of qtbase to CMakeSimon Hausmann2018-11-011-0/+41
Done-by: Alexandru Croitor <alexandru.croitor@qt.io> Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Done-by: Kevin Funk <kevin.funk@kdab.com> Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Done-by: Simon Hausmann <simon.hausmann@qt.io> Done-by: Tobias Hunger <tobias.hunger@qt.io> Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-by: Volker Krause <volker.krause@kdab.com> Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>