summaryrefslogtreecommitdiffstats
path: root/cmake
Commit message (Collapse)AuthorAgeFilesLines
...
* CMake: pro2cmake.py: Handle SIMD sourcesTobias Hunger2019-03-181-0/+52
| | | | | Change-Id: Ib445888e769432e8c247ae2d2fb5d8af2d5cd275 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Use qt_evaluate_config_expression for feature enable conditionsAlexandru Croitor2019-03-141-2/+4
| | | | | | | | | | | | | | | Certain features like opengles2 can be enabled or disabled based on the conditions that are specified in the ENABLE and DISABLE parameters. Because some of those conditions use STREQUAL with a single quoted argument, we have to use qt_evaluate_config_expression to circumvent the CMake bug regarding single quotes, which is described in the function implementation. Only then will enabling / disabling work correctly. Change-Id: I3b68ef611c985f0d8416fd089055fd862da1e542 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Update README to mention setting the vcpkg toolchainAlexandru Croitor2019-03-111-1/+2
| | | | | Change-Id: Icac2ba956246901e02bb6aa257f81cccf56560e8 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Fix header Depends file generationAlexandru Croitor2019-03-111-0/+1
| | | | | | | | The script used to write incorrect dependency headers due to not clearing the qtdeps variable at each loop step. Change-Id: Icf293be7cea596daa096ab19d390c0bb468a8654 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Improve add_qt_resource functionTobias Hunger2019-03-111-8/+24
| | | | | | | | * Handle BASE to give the directory files will be relative to. * Support lang="foo" for qresource sections. Change-Id: I36087220d03789a97105dc6dd1aca7a25a063d9f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: fix the order of parameters for homebrewLiang Qi2019-03-071-1/+1
| | | | | Change-Id: I7b597a8d6bc81eafb21e5368a29700638c351bdf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update README to specify the minimum version of CMake neededAlexandru Croitor2019-03-071-3/+6
| | | | | Change-Id: I10e594859129bddfa56f078389b2272a0072fda0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: Fix moc on macOSMikhail Svetkin2019-03-061-10/+48
| | | | | | | | | moc does not generate moc_defs.h and that's why moc does not understand that he runs on macOS. It happens because cmake can not find Qt version. Change-Id: I34c51ebb69dc1ff782a0f129e114cda819122805 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Handle gc-sections linker flagsTobias Hunger2019-03-041-11/+21
| | | | | | | Add a function to set gc-sections flags on the linker. Change-Id: I9ac02364836d2aa8de239adb8d3a5d29659a4007 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix usage of linker -no-undefined flag for macOSAlexandru Croitor2019-02-271-6/+15
| | | | | | Change-Id: I41c55871a8db3d860fc20ad17eb9a97b01d62448 Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: Fix build without double-conversion on macOSMikhail Svetkin2019-02-271-8/+15
| | | | | | Change-Id: I5102e93141eec95044df44884dcf6ecd1b9e8dd0 Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Start adding compiler flagsAlbert Astals Cid2019-02-213-0/+10
| | | | | | | | | Only has warnings for now Next to come is the support for developer-build and enabling Werror Change-Id: I8070dc06eb439c2a03007cce975c8147ff7e1582 Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* cmake: set a CMAKE_BUILD_TYPE if none was specifiedAlbert Astals Cid2019-02-211-0/+12
| | | | | | | Because the default "empty" CMAKE_BUILD_TYPE is a weird default Change-Id: I5768f67aa85dce4108e421d2f4eacdfb1cb5beb0 Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* Update FindEGL.cmake from upstreamSimon Hausmann2019-02-201-4/+2
| | | | | | | | Upstream commit 7c64db9568296e1caafcfd7163cea3ab1b1626ae fixed the suffix path checking and thus the build on FreeBSD. Change-Id: I0cceeac0639c2899c617ffd6359098d2154acf5b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add support for building conveniently with ccacheSimon Hausmann2019-02-191-0/+8
| | | | | | | | | Pass -DQT_USE_CCACHE=ON to enable the use of ccache. This avoids having to set up symlinks, which is useful when cross-compiling against different targets. Change-Id: I023fff105baaa538730997948aa122d2678887ce Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* Fix use of uic when cross-compilingSimon Hausmann2019-02-191-0/+16
| | | | | | | | Don't try to build uic but instead import it. This is done centrally now in add_qt_tool. Change-Id: I241fbb924de68549e9c0320e157351bd7b1bf5c3 Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* Provide some basic instructions for cross-compiling and using CCacheSimon Hausmann2019-02-191-0/+24
| | | | | Change-Id: I8bb90746d0cef2ea61a5494ef358713d732dcfce Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* cmake: Make sure to finddeps of private targetKevin Funk2019-02-141-30/+33
| | | | | | | | | | | Public interface libraries of the private target need to be first looked up via `find_dependency(...)` in the CMake config files as well. This patch is just changing the foreach() loop and defer the package config file generation. Change-Id: Iecaf7f778379b526f12ac6a42e76d714d9349b2c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: Make sure QT_SYNCQT is persistedKevin Funk2019-02-141-7/+9
| | | | | | | | Lifetime of the variable is bound to the function body. Use a CACHE variable to escape it (and to speed up future calls to the function). Change-Id: I2d164a1c94e64cc652e65c1eea0522f3d911ad82 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: Make sure QtModuleConfig.cmake.in is foundKevin Funk2019-02-141-1/+2
| | | | | | | ... when QtBuild.cmake is being included from another Qt module Change-Id: Ia55e03422cc84a56dd9eac640621e5b2ee9681bd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: Install all necessary .cmake filesKevin Funk2019-02-141-0/+6
| | | | | | | ... for other modules Change-Id: Iea184036a46816e524de247e1d650ae417de294c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: Minor fix in QtModuleConfig.cmake.inKevin Funk2019-02-141-1/+1
| | | | | Change-Id: Ia01e935582b5291fa8ed6bf46866fbb74d41f4b0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: Also use -Wl,--no-undefined for ClangKevin Funk2019-02-131-2/+2
| | | | | Change-Id: Ida6bf41e496a0e800f1146d15edf192d0635a3c9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Replace "our" FindEGL.cmake with the ECM versionSimon Hausmann2019-02-132-32/+166
| | | | | | | | The ECM version now also does a compile test, which was the only real "functional" difference. Change-Id: I1d5cd590359feba7c7a38ff374992349d5943070 Reviewed-by: Volker Krause <volker.krause@kdab.com>
* Use rpath by default not only for building but also installed binariesSimon Hausmann2019-02-131-0/+14
| | | | | | | | | This makes it possible to use the binaries out of the box. This is particularly relevant for program binaries that link against QtCore dynamically, when trying to use these binaries during cross-compilation. Change-Id: I7dee93194be3fff5c6e3bbb9e202e4cf5e19b6d0 Reviewed-by: Volker Krause <volker.krause@kdab.com>
* cmake: set WrapOpenGL_FOUND to ONAlbert Astals Cid2019-02-121-0/+2
| | | | | | | | | | | | Otherwise the cmake summary at the end says -- The following packages have not been found: * WrapOpenGL It's OpenGL or GLESv2 that will show there as missing if needed Change-Id: I182f1299b86e1a4e24762d0bad6533c6136cbbcc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Use CMakePushCheckStateVolker Krause2019-02-121-3/+3
| | | | | Change-Id: I58d779674363a7f7db4a7ea4ca4a9f4a9e271798 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix build without VulkanSimon Hausmann2019-02-121-2/+2
| | | | | | | | | The syncqt generated headers are optional, i.e. their source may not exist -- so for now make their installation optional (as it seems to have been the case with qmake). Change-Id: Ieaeb3d13a1d8ff1f158b5b1c918750fec48d3bef Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* Fix Desktop GL/EGL/GLESv2 linkageSimon Hausmann2019-02-123-0/+88
| | | | | | | | | | | | | | | | This change fixes a few things in one go: * cmake's FindOpenGL cannot be used reliably to detect EGL. So use a custom module for that. * Added a custom module for GLESv2 detection, as cmake's FindOpenGL does not support that. * Map CONFIG += opengl to a WrapOpenGL target, which links against either GLESv2 or libGL - just like mkspecs/features/*/opengl.prf * cmake's FindOpenGL remains in use solely to detect the availability of desktop gl. Change-Id: I9315e5ad1fd88e1b7dc7e920053e98fb51fea7fc Reviewed-by: Volker Krause <volker.krause@kdab.com>
* cmake: update README.mdLiang Qi2019-02-121-0/+10
| | | | | | | Added info for using homebrew on macOS. Change-Id: Ie425793d3de1e72a9342f6c2aaf67a4f85592f3a Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* cmake: Search and enable the sqlite[3] pluginAlbert Astals Cid2019-02-121-16/+18
| | | | | | | | Added to QtFeature.cmake a way to be able to run feature_module begin and end without having an actual module by passing NO_MODULE Change-Id: Ib708bd3878e2591da193d18563c8932cc4b75e7f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix finding syncqt when "cross compiling"Simon Hausmann2019-02-121-0/+2
| | | | | | | | This is not quite the correct design yet, but makes the existing mechanism work first. Change-Id: Idbc6f1380adc955a772eb6e5beb6b3a5f7f686bb Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* Fix qt_config_compile_test when cross-compilingSimon Hausmann2019-02-121-4/+18
| | | | | | | | | | | | | | | | | | When we do qt_config_compile_test(egl_x11 LABEL "EGL on X11" LIBRARIES X11::X11 ... ) then check_cxx_source_compiles() aborts if the provided targets do not exist (we map LIBRARIES to CMAKE_REQUIRED_LIBRARIES). However we just want the test to fail. Therefore this patch verifies the presence of the targets. Change-Id: Ibd7c1b50d585339af0ca0de58bc5c9cd64d65d6d Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* cmake: Start to use ConfigExtra.cmake filesKevin Funk2019-02-122-8/+18
| | | | | | | | | | | | | | Enables the use of e.g. QT_NO_DEBUG in compiler flags, -fPIC, passing on of QT_NAMESPACE, etc. pp. Dropping a lot of custom code which handled adding imported targets for the command-line tools (this is all being handled by CMake already). It needs to be investigated if we need to resurrect Qt5GuiConfigExtras.cmake.in in one way or the other. Change-Id: I4fa141b68fddaad4f33e628c59d5d0b3a7b3a096 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Find mtdev and use itAlbert Astals Cid2019-02-121-0/+3
| | | | | Change-Id: I90db48efaa6a23add770fcf69b46c4f4c84866c1 Reviewed-by: Liang Qi <liang.qi@qt.io>
* cmake: replace unused macro with a proper valueJean-Michaël Celerier2019-02-121-3/+3
| | | | | Change-Id: Icc2b5a63fc503aa99bbb0c8ee9ffddc985e0e3da Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: Create Qt5 compat targets in config filesKevin Funk2019-02-125-17/+20
| | | | | | | | For now create targets a la "Qt5::Core" to stay compatible with the current Qt5 naming scheme. The name is controllable via a CMake option. Change-Id: If43c058221949b1900c2093f39ccc9d0f38028f1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: Set up VERSION/SOVERSION properlyKevin Funk2019-02-121-0/+2
| | | | | Change-Id: Ic8cddf5ec8182873a6b1e03c76f514284b423322 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: find gtk3 and build the gtk3 platformthemeAlbert Astals Cid2019-02-111-0/+3
| | | | | Change-Id: I7db7321a2fd5ea0eda1924f3dece3b1c86d87d10 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* cmake: Find tslib and build the tslib plugin if foundAlbert Astals Cid2019-02-111-0/+3
| | | | | Change-Id: I7119ddf473a3ede29bbfef23cffb08a4fcbd5681 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* cmake: QtFeature: Do not error out when using QtKevin Funk2019-02-111-2/+2
| | | | | | | | ... outside of qtbase.git Change-Id: I1895ef07c881766e2b28839d0422916b6916e10e Reviewed-by: Jean-Michaël Celerier <jean-michael.celerier@kdab.com> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* cmake: Make find_package(Qt5 ...) work properlyKevin Funk2019-02-114-45/+72
| | | | | | | | | | | | | Introduce a new cached variable INSTALL_CMAKE_NAMESPACE for defining the prefix used for CMake config files (c.f. "${PREFIX}Core/${PREFIX}CoreConfig.cmake") Also make sure to `find_dependency(...)` the required packages inside the individual CMake config files. I.e. in Qt5WidgetsConfig.cmake, search for Qt5Core, etc. pp.. Change-Id: Idc027925fe9d5323091c4853803ad5ce44b1afc6 Reviewed-by: Jean-Michaël Celerier <jean-michael.celerier@kdab.com> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* cmake: Parse SYNCQT.INJECTIONSKevin Funk2019-02-111-1/+28
| | | | | | | | | Allows to install headers such as QtCore/qtconfig.h, QtGui/qvulkanfunctions.h, etc. Change-Id: I93f384cdc8bbee07fab316d7e232aae1d209f33e Reviewed-by: Jean-Michaël Celerier <jean-michael.celerier@kdab.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: we need to find for libudev not udevAlbert Astals Cid2019-02-111-1/+1
| | | | | Change-Id: I36bac8c01d8de2b151c3d4d89607d26ac8add3d2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: QtFeature add debugging aidKevin Funk2019-02-111-1/+1
| | | | | | | Persist the target name in the CMake cache description Change-Id: I124a8b89e5845d12301993b0546c8d5c91b8d8bb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: Do not rerun try_compile invocationsKevin Funk2019-02-111-0/+4
| | | | | Change-Id: I5eccf9f810d7ee55a311884bd5cf483f8086bae6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Allow passing libraries to qt_config_compile_testAlbert Astals Cid2019-02-111-2/+5
| | | | | | | | Fixes cxx11_future and ipc_posix tests Change-Id: I0f3a7b1a0452724c07198a87c2fc25344e7451eb Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* cmake: Only use the doubleconversion cmake config if "valid"Albert Astals Cid2019-02-011-1/+3
| | | | | | | | | And by "valid" i mean if it returns the double-conversion::double-conversion target that we are going to use later. Fedora rawhide has a doubleconversion cmake config file but it doesn't define any target Change-Id: Ib0360bc9fdf593a14510c9a2d59b47b32bc4b356 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: Introduce QT_HAS_NAMESPACETobias Hunger2019-01-311-0/+5
| | | | | | | This makes testing for Qt with namespace builds easier in extend_target. Change-Id: I58ab985a2ed39859fb65d35f8f69065fed2a5c9b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: Add FindZSTD.cmake and wire it up in configurejson2cmake.pyTobias Hunger2019-01-311-0/+49
| | | | | | | Zstd is used in the dev branch, so prepare for it. Change-Id: I130d98e3888a1eb4c7444728fc5088c5dae9d911 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>