aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Remove debug list source files comparisonCristian Adam2021-11-291-1/+1
| | | | | | | | | | This was needed in the early days of the CMake port when the list of source files would change due to being added to the qmake project files. Change-Id: I7afd219b24ab7a0d87fce26ba35dac75cf8caa5b Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Add option to build QtCreator with sanitizerJoerg Kreuzberger2021-11-051-0/+4
| | | | | | | Fixes: QTCREATORBUG-26318 Change-Id: I44589b5bb39958eda2329b444e4857e8f61823bf Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Define BUILD_WITH_PCH before usageCristian Adam2021-10-201-2/+2
| | | | | | | | | | | | | | | | | On Windows QtCreatorAPIInternal.cmake would contain a check for BUILD_WITH_PCH and if not set add a few defines to the DEFAULT_DEFINES. First time the BUILD_WITH_PCH would not be set, because the option will be set later, the DEFAULT_DEFINES will contain the specific non-pch defines. The second time BUILD_WITH_PCH would be ON and those non-pch specific DEFAULT_DEFINES will be removed, and the build system has to do a full rebuild because the defines changed. Change-Id: I3f039a91667affc35f18103cfed062481f9dc93e Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* CMake build: Allow compilation without QtQuickEike Ziller2021-10-201-3/+2
| | | | | | | Disable the parts that require it in that case. Change-Id: I3f62eb9b325905ea225009aad6b9020cef545da6 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Add option to link with QtCristian Adam2021-09-151-0/+3
| | | | | | | | | The named option is BUILD_LINK_WITH_QT, which when set to ON will generate the QtCreator.ini file needed for Qt Creator to find the installed Qt. Change-Id: If3a47a463510fbfc90a314829378c6c4e505d2f7 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CMake build: Define common output directory for qt_add_qml_moduleAlessandro Portale2021-09-101-0/+3
| | | | | | | | | | | | | | | | | In order to enable tools like qmllint and in order to avoid the following warning, define QT_QML_OUTPUT_DIRECTORY Warning message: The Tracing target is a QML module with target path QtCreator/FooBar. It uses an OUTPUT_DIRECTORY of foobar, which should end in the same target path, but doesn't. Tooling such as qmllint may not work correctly. Since this change is relevant for the build against Qt 6.2-Beta4, common_environment.yaml gets bumped, accordingly. Change-Id: Ic6766cf29baddd7c22b68270a0f1702aade7c53f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CMake build: Enable BUILD_WITH_PCH for builds with Qt 6Eike Ziller2021-07-011-4/+1
| | | | | | | | | The issues have been fixed in the meantime Fixes: QTCREATORBUG-25950 Change-Id: I22cf765acd3008a5b216a9e6afe5854589c7b515 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Merge remote-tracking branch 'origin/4.15'Eike Ziller2021-05-251-5/+6
|\ | | | | | | Change-Id: I3d3dfa04124eed14952294c2847b9851dcb1a5fd
| * CMake: Fix build with MSVC 2019 and Qt 6.2Cristian Adam2021-05-211-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt 6.2 requires __cplusplus preprocessor set to at least 201703L According to https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus one needs to add the compiler flag /Zc:__cplusplus CMake doesn't set the flag, there is an issue opened at https://gitlab.kitware.com/cmake/cmake/-/issues/18837 This flag is passed to any target that links to Qt6::Core, unless the flags are not manually copied for some reason. Task-number: QTCREATORBUG-25730 Change-Id: I271e85fe857b5d4ac8980f77c723e5704a8eb743 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | Add more information to appdata xmlYouri Westerman2021-05-051-0/+1
|/ | | | | | | | | | - Add oars content rating to appdata xml - Add screenshots to appdata xml - Add release info Change-Id: I61bf023814149983f7a64e03f49eb8d998dac85b Reviewed-by: Youri Westerman <tetracon@gmail.com> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* COIN: Add hack to support debug info with sccache and MSVCEike Ziller2021-04-261-0/+2
| | | | | | | | | | | sccache does not support the "/Zi /FS" option for debug information with MSVC. Optionally replace "/Zi" by "/Z7", which leaves debug information in the object files and only collects it at link time. See also qtbase 2354274f39934b94383923834479901106489def. Change-Id: Id94c2116f3c4192556dbdf8fe82b12ce0a204273 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake build: Fix remaining issues with Devel packageEike Ziller2021-04-061-2/+2
| | | | | | | | | | | | | | | | | | | | | On Linux (and Windows) we should not create toplevel files (README.md etc) or directories (doc/, scripts/ etc). On macOS, move the whole Devel package contents into the app bundle, because that is installed toplevel in the Qt installers, and we shouldn't even create include/, lib/ or any other directory at the toplevel at all. Since the prefix path must now point to the Resources folder inside the app bundle, adapt build_plugin.py to also accept --qtc-path pointing to the app bundle (Qt Creator.app) itself, and also to the app bundles parent directory. Adapt the Qt Creator plugin project template similarly. Task-number: QTCREATORBUG-25414 Fixes: QTCREATORBUG-25415 Change-Id: Ic756237fb920b54b1ec95d076649ad947b39a7e8 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake build: Disable FakeVim and building with PCH with Qt 6Eike Ziller2021-03-101-1/+5
| | | | | | | | | | | FakeVim does not compile on MSVC because Qt 6 doesn't like meta types that are recursive maps with keys that have a custom operator==. Building with PCH has different issues on macOS and MSVC. Change-Id: Id1b9580f7347f1c8facade67fd74532a023af41f Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/4.14'Eike Ziller2021-02-221-0/+19
|\ | | | | | | Change-Id: Ib9512b4fc5e17b04ca4be79fc315e79a52d06497
| * CMake build: Add .pri files to development packageEike Ziller2021-02-221-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds at least partial, transitional support for building 3rdparty plugins with qmake against Qt Creator built with CMake. This might still miss some other .pri files that follow their own naming conventions. Fixes: QTCREATORBUG-24055 Fixes: QTCREATORBUG-25334 Change-Id: I83cc547da938976c2ec12a21a17f286b937147f7 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* | CMake: merge binary directories of sub projectsChristian Stenger2021-02-051-0/+3
| | | | | | | | | | | | | | ...into top level. Exceptions are applied explicitly. Change-Id: I59c54967dffc0bef2e8cc05c73763fcf18c12517 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Find Crashpad via CMake configurationEike Ziller2021-01-201-0/+11
|/ | | | | | | | | | Makes it possible to point CMake to crashpad via CMAKE_PREFIX_PATH if it was built to <crashpad>/out/Default, or by setting individual CRASHPAD_* variables to the sources and build results. Change-Id: I9634fe7ab8c1e14b7e0f3ccf3415396c8dc1e71a Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
* cmake build: Add option to build against system SyntaxHighlighting libEike Ziller2020-12-111-0/+1
| | | | | | | | | | | | Enable/disable our own KSyntaxHighlighting by default depending on the availability of KF5SyntaxHighlighting. If that is available, it still is possible to turn the building and using of our own KSyntaxHighlighting copy on by enabling BUILD_LIBRARY_KSYNTAXHIGHLIGHTING. Fixes: QTCREATORBUG-25076 Change-Id: I3545fc12d87572d7eb6f5977994b081ff7ea3880 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* cmake build: Re-add a "Dependencies" component that runs deploy scriptEike Ziller2020-11-241-0/+30
| | | | | | | And use that from the build script. Change-Id: I97d5b593cf703bb8e51556240f37c80aad654732 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* cmake build: Remove unused component "Dependencies"Eike Ziller2020-11-231-5/+0
| | | | | | | | | | | We don't use it for packaging, nor for github anymore, it duplicates a whole lot of logic, and that only partially (as an example fixing the RPATH for clang tools on macOS is missing), and the Clang part only works with CMake >= 3.14 ("file(READ_SYMLINK"), which was the final trigger of this patch. Change-Id: I21ff6b01297009eff15bda36963e729dea4927c8 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* cmake build: Copy/install correct branding fileEike Ziller2020-11-101-1/+1
| | | | | | | | When changing branding, we need to copy and install that different branding file instead of the standard one. Change-Id: I3a2f8391b5e5ed1c4c79b81294ed6221df5e7ddc Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* cmake build: Fix documentation generation with Qt6Eike Ziller2020-11-021-1/+1
| | | | | | | | qhelpgenerator moved to a separate package "Tools" which doesn't exist in Qt5. Task-number: QTCREATORBUG-24098 Change-Id: If7d0d638d6cee27f9154141ca415fb412745d1ee Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake build: Make Qt6::Core5Compat available in a portable wayEike Ziller2020-09-071-2/+5
| | | | | | | | | | | While porting to Qt6 we'll need the compat library at some places. Add a custom Qt6Core5Compat target that we can unconditionally use. For Qt5 it refers to a dummy target. For Qt6 it refers to the actual compat library. Task-number: QTCREATORBUG-24098 Change-Id: Idd2b9f285352f685cfe715eee3fa046dfb468873 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake build: Check minimum Qt versionEike Ziller2020-09-031-2/+2
| | | | | Change-Id: I81244c2480d647a2cf48885b2a125a02b11767b4 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake build: Support building clang tooling without static libsEike Ziller2020-09-031-12/+2
| | | | | | | | | | | Create a FindClang.cmake and move all Clang configuration there. Find Clang and choose static libraries if available, otherwise use clang-cpp if available. Add option to link to clang-cpp even if static libraries are available. Fixes: QTCREATORBUG-23172 Change-Id: If40304d174469df0c786259e724cbee8de0e2d0e Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Merge remote-tracking branch 'origin/4.13' into masterEike Ziller2020-08-211-1/+1
|\ | | | | | | | | | | | | Conflicts: CMakeLists.txt Change-Id: I799060da2cb299bb0c49a3da3530fad18427a23c
| * CMake build: Stop looking for QtScriptEike Ziller2020-08-191-1/+1
| | | | | | | | | | | | | | | | It is no longer used. Amends 7a3f5edfafaed19f71cd08655b6bbaa770b39f12 Change-Id: Id76d05a303179f071cdc334dd0f1e7041b7eaa92 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | CMake: Use Qt5::DesignerComponentsTobias Hunger2020-08-101-1/+2
| | | | | | | | | | | | | | | | QTBUG-75867 about missing Qt5::DesignerComponents support has been fixed, so use that over our own hand-rolled version. Change-Id: I6d8bb7f7d5359050f20a095adb4a074f143e8d49 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Require GCC 7 and enable C++17Eike Ziller2020-07-101-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | Fix MSVC2019 - result type of conditional expression is ambiguous: types 'const char [1]' and 'QByteArray' can be converted to multiple common types Fix MinGW 8.1 - undefined reference to SemanticHighlightNotification::methodName Fix Utils::transform with std::vector for GCC & MSVC Unfortunately we cannot get rid of the special variant and optional implementations, because Apple Clang requires deployment target >= 10.14 for the functions that can throw std::bad_optional_access. Fixes: QTCREATORBUG-20520 Change-Id: I5c36a70f21f8b0215d2f4fc5c0653a022778d928 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* CMake build: Add feature info for building testsEike Ziller2020-06-041-0/+1
| | | | | | | Was wondering if my current build included tests or not... Change-Id: I17030455ffd89d6b482e8cc08da3cb3b2dcbbe35 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake Build: Set /permissive- (standards conformance mode) for MSVCVolodymyr Zibarov2020-05-291-0/+5
| | | | | | | | | | | | | | | | | To make errors appear faster when developing on Windows MSVC 2017 and later have this flag to disallow MSVC-specific C++ language extensions. Use it to make code more correct and more portable. Set this option with add_compile_options() in root CMakeLists.txt to apply it to all targets. Add one #include to unittest/gtest-clang-printing.cpp as workaround for forward template declaration bug in MSVC http://tiny.cc/fa4tpz Change-Id: Ie0b19701ad773c79ffd2fed24fffbb1dcb29538c Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* CMake Build: Update CMake minimum Version to 3.10Cristian Adam2020-05-261-1/+1
| | | | | | | | | | | | | | | This is due to policy CMP0071 which affects AUTOMOC and generated files. With CMP0071 set to OLD (CMake 3.9) precompiled headers would fail to work with GCC. GCC and precompiled headers would still require the upcoming 3.18 CMake, but having CMP0071 set to NEW (CMake 3.10) is a prerequisite. Change-Id: I7c3c1f739877646a91ffa07e2a8006ab7d6f4d77 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CMake build: Move documentation functions to re-usable locationEike Ziller2020-05-251-34/+1
| | | | | | | | | | | Removes "install_..._docs" and "clean_docs" special targets. Instead install documentation with "--install . --component qch_docs" and "--install . --component html_docs" which have the advantage that the install prefix can be specified later on with --prefix. Also removes export of IDE_SOURCE_DIR, which is not used. Change-Id: I4fce0b9aa8c7fc40b7e94e065777ddf4c0b76c41 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake build: Make translation function available to external pluginsEike Ziller2020-05-051-0/+1
| | | | | | | And fix that the "ts_all" target did not get the custom target prefix. Change-Id: Iff6a5e328456f3d949c31f2e41b48c400fad773c Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Fix link on commit sha in about dialogEike Ziller2020-03-231-2/+2
| | | | | | | | | | Passing a URL via defines breaks when trying to "stringify" it. It would always stop at the first slash. Instead use a qmake variable directly. That has the additional advantage that the value isn't passed on each and every compiler command line. Change-Id: I97a297fbcdee5ea03eb6fa08181c95b1ad2de767 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake Build: Let the version dialog log link point to the repo of originAlessandro Portale2020-02-101-1/+2
| | | | | | | | | | | | | | | | | https://github.com/<qtcreator-fork>/commits/<sha> Instead of expecting a "%1" placeholder in the passed-in IDE_REVISION_URL_STR, we now expect IDE_REVISION_URL_STR to be a plain URL. Reason is that passing a string containing "%1" from CMake to the VersionDialog caused a premature replacement of that placeholder somewhere on the way. Also log the CMake configure call in build_cmake.yml Change-Id: I4c1a946c66f891101576e3556ca87a004cead950 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CMake Deployment: Remove Dependencies componentCristian Adam2020-02-061-0/+5
| | | | | | | | | - Install will also copy the dependencies. - Made the dependencies search recursive, not just two steps - Moved install code to a script, not having to escape quotes and dollars Change-Id: I6c5fb19e4094e9dcd4b339d5b90be6e7c5055223 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* CMake Build: add perfparserCristian Adam2020-01-281-1/+4
| | | | | Change-Id: Ib16548befefbb827f2752300f9e67da3cf91570c Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Merge remote-tracking branch 'origin/4.11'Eike Ziller2020-01-031-0/+6
|\ | | | | | | Change-Id: I0657cee6b87eea7b3178548bebed85d5ac824519
| * CMake build: disable some warnings for build against llvmqds/v1.4.0David Schulz2019-12-191-0/+6
| | | | | | | | | | | | | | | | Add the same ignore warning flags to the compiler as in clang_installation.pri Change-Id: Ieb3f6ac861cba60b6c7fb3c74e4c9b46a62d22b9 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* | CMake: Do not require Qt LinguistToolsTobias Hunger2019-11-131-1/+3
|/ | | | | | | | They are only used optionally for the translations, so there is no need to require those. Change-Id: I9f84e0d62f7075394e9f260c11746e4327e60995 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* CMake Build: Properly build qtcreatorcdbextCristian Adam2019-10-081-4/+0
| | | | | | Change-Id: I8b4a58d79124debd877442fe23798c77bff723c5 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Merge remote-tracking branch 'origin/4.10' into 4.11Eike Ziller2019-10-021-1/+1
|\ | | | | | | | | | | | | Conflicts: src/plugins/projectexplorer/projectnodes.h Change-Id: I10a749cca38c2d0929cf4d2b74ab089e14b6157b
| * CMake Build: Fix LLVM lookup for cases when many versions availableAlexander Akulich2019-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | If calling both find_package(Clang) and find_package(LLVM), call find_package(Clang) first to get the currently active Clang version by default with a consistent version of LLVM. (Similar to the FindPythonInterp/PythonLibs ordering) Change-Id: Ib6da04e0fb0ffc1fe67a8eafb0c5f04abbb36b6c Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | CMake Build: Allow building with Qt5 and Qt6Cristian Adam2019-09-241-4/+8
| | | | | | | | | | | | | | Emulate Qt5's functions/targets with Qt6 equivalents. Change-Id: I6bfc5c8a649f0ddc5f1117bc5b2d0f41cb72c821 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | CMake: Handle translationsTobias Hunger2019-09-171-2/+2
|/ | | | | | | | | | | | | | | | | (Optionally) re-generate .ts files from CMake by running lupdate and run lrelease to generate .qm files. Changes to qmake: * src/libs/3rdparty/syntax-highlighting/src/cli/kate-syntax-highlighter.cpp is no longer translated: It's a command line tool that is not used by creator * src/libs/aggregation/examples/text/main.cpp is no longer included in ts files * src/libs/qt-breakpad/qtcrashhandler/* is no longer included in ts files: It is not built right now Change-Id: Iec018da86a111a68ec983a880cef2961b48ccdf9 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CMake build: Build with PCHCristian Adam2019-08-141-1/+2
| | | | | | | This commit enables building with upstream CMake PCH support. Change-Id: Ib37745b00e7560e804483e7c2c2a3fa7cf6d663c Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CMake build: Add "Devel" packageCristian Adam2019-07-251-67/+2
| | | | | | | | | The "Devel" package will contain headers, libraries, documentation needed by the 3rd parties to build Qt Creator plugins. Fixes: QTCREATORBUG-22514 Change-Id: If54929f823982b921b98a63ff6085d53618a3a49 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CMake build: Allow brandingEike Ziller2019-06-211-20/+6
| | | | | | | | | | Create your own QtCreatorIDEBranding.cmake somewhere and point cmake to it via CMAKE_MODULE_PATH Task-number: QTCREATORBUG-22488 Change-Id: Ic1057d879c5104b57e4ed8ef8a9c4fc8d4140de9 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CMake build: Do not write versions etc into the cacheEike Ziller2019-06-211-22/+21
| | | | | | | | | | The user is not supposed to change these via configuration. If they are written to the cache, version bumps do not take effect automatically, resulting in quite some hassle. Change-Id: Ibaf9dba02114da1cbc3ec2210ae7c3328f35bb1f Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>