aboutsummaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Build: Remove FindQt5.cmakeEike Ziller2023-02-231-7/+2
| | | | | | | | | | | No longer needed, since we generally only support building with Qt 6 nowadays, and the parts that still do support building with Qt 5 handle that manually. Change-Id: I72381589ca3ab7bf1af88d9f185cad7f0cdf149c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Qt Creator Static build supportCristian Adam2022-04-291-1/+1
| | | | | | | | | | | | | | | | | | | This adds the build system feature that allows Qt Creator's libraries and plugins to be compiled statically. Fixes some symbol clashes when all plugins are linked into the same executable. Support for actually loading static plugins will be added in a separate commit. The feature is controlled by QTC_STATIC_BUILD which by default is OFF. Change-Id: I1fab7953c43e42dc75619e35660029ee067106df Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake build: Allow compilation without QtQuickEike Ziller2021-10-201-1/+2
| | | | | | | Disable the parts that require it in that case. Change-Id: I3f62eb9b325905ea225009aad6b9020cef545da6 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake build: Fix remaining issues with Devel packageEike Ziller2021-04-061-5/+5
| | | | | | | | | | | | | | | | | | | | | 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/Linux: Fix location of separate pluginsEike Ziller2021-01-261-0/+10
| | | | | | | | | | | | | | We use GNUInstallDirs to define the location of plugins, libraries and so on. If Qt Creator was configured with a specific set of locations, we need to pass that on to separately built plugins even if GNUInstallDirs would use different locations for them. Otherwise Qt Creator cannot find these plugins. Amends c81baf1a9cc938a283f6c52c8fd10bab84183391 Fixes: QTCREATORBUG-25266 Change-Id: Ib0da1428ec676fd54cb264b1aba4791b18b2c3bd Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* cmake build: Fix building external plugins with Qt6Eike Ziller2021-01-061-1/+1
| | | | | | | | | | | | When finding a Qt component, make sure to explicitly mention the implicit dependencies too. This is a workaround for a defect in FindQt5.cmake, which only creates alias targets and sets the IMPORTED_GLOBAL property on components that are explicitly listed in the find_package/find_dependency call. Change-Id: I98c4090ece1fa5704c3a7abeb0e8e27475a30757 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* cmake build: Create DebugInfo component with separate debug infoEike Ziller2020-11-171-0/+4
| | | | | | | | | | | When building with RelWithDebInfo. The CMake code is adapted from corresponding (internal) functions from Qt 6. Also let the scripts create an additional *-debug.7z with the debug info. Task-number: QTCREATORBUG-24916 Change-Id: Ibc3c8c0013718b9c5e868136e5ce01e1e99f84c4 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* cmake build: Fix permissions of scripts in installationEike Ziller2020-11-111-0/+1
| | | | | | | | CMake doesn't copy file permissions by default. Fixes: QTCREATORBUG-24907 Change-Id: I3f452502de49517f72ace1a4a2696c797c95bdfa Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* cmake build: Copy/install correct branding fileEike Ziller2020-11-101-2/+2
| | | | | | | | 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: Add option for exporting pluginsEike Ziller2020-10-221-0/+2
| | | | | | | | | | | | | | That can be used for external plugins. Just add the option "EXPORT" to your "add_qtc_plugin(MyPlugin ...." call. Other plugins can then do "find_package(QtCreatorMyPlugin)" and link against "QtCreator::MyPlugin". Supports both using a Devel install or using a build directory of the plugin that is depended on. Task-number: QTCREATORBUG-22803 Change-Id: I80724eca8c828d2d5be307d32f3125c4e3bd8b3a Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* cmake build: Install our special FindQt5.cmakeEike Ziller2020-10-221-0/+1
| | | | | | | Which handles the Qt5 vs Qt6 differences Change-Id: Ie2e4d1c9564cd1d88c912b23c08a721e9e4e1b90 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake build: Qt6 build fixesEike Ziller2020-09-041-1/+5
| | | | | | | | | | Set Qt5_VERSION for version checks (e.g. currently still JavaScript locator filter). Export special FindQt5.cmake for external plugins and super-repo builds. Change-Id: I5edb8b0e8bef1a341cd2ff04a13d0a6ce22f6558 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake build: Move documentation functions to re-usable locationEike Ziller2020-05-251-1/+6
| | | | | | | | | | | 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: Move internal functions from QtCreatorAPIEike Ziller2020-05-181-0/+2
| | | | | Change-Id: Iade7ae7533abb8b8ed0ccba8bd246b4a734794b6 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake build: Make translation function available to external pluginsEike Ziller2020-05-051-0/+6
| | | | | | | 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>
* CMake Deployment: Remove Dependencies componentCristian Adam2020-02-061-2/+0
| | | | | | | | | - 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 Dependencies install targetCristian Adam2020-01-301-0/+2
| | | | | Change-Id: I17f8d26500a9a75bef64e23c3b64492c1bb929cc Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* CMake Build: Add app_version.h to Devel packageCristian Adam2019-09-181-1/+3
| | | | | | Fixes: QTCREATORBUG-22802 Change-Id: I7616eab534127c806093240de430fe060d8bd0df Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CMake Build: Use same Qt compiler defines for testsCristian Adam2019-09-101-10/+0
| | | | | | | Source code needed adjustments though. Change-Id: I78b4610a6bb895a385c7c30a6c92c97a276b89dd Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/4.10'Eike Ziller2019-07-261-537/+63
|\ | | | | | | Change-Id: I427280fdb207b878000697dfd37595ffdb26f4e7
| * CMake build: Add "Devel" packageCristian Adam2019-07-251-537/+63
| | | | | | | | | | | | | | | | | | 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>
* | Enforce QT_NO_JAVA_STYLE_ITERATORShjk2019-06-201-1/+3
|/ | | | | | | We don't use them and Qt is likely to deprecate them. Change-Id: Ib2fbb3f509081f5eb7aae6c41dd330cc57db59e1 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CMake: Do not include libraries in "all" targetTobias Hunger2019-06-051-1/+2
| | | | | | | | | This makes sure creator will not build libraries that are not needed by the plugins that are enabled. Change-Id: Ia568d56be24d47d895d70cc78f6601dd611f1aaa Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* CMake build: Skip installation of test plugins / executablesCristian Adam2019-06-051-8/+12
| | | | | | | Our tests run from the build folder. We do not need to install them. Change-Id: Iaeb27e466fe0d43bc15fa3eee3bf6d2659b87083 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake Build: Add Qt and clang in PATH variable for Windows testsCristian Adam2019-06-031-0/+4
| | | | | | | | | | | | Windows doesn't have RPATH support, and Qt and clang directories need to be set into PATH environment variable for tests to be able to run. On my work machine I had the directories set into the global PATH environment. Change-Id: I91e0adc5999479e7dcf3cf0a734ed31e6edc402f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CMake build: Add unittest CMake build filesCristian Adam2019-05-291-15/+41
| | | | | | | | | On MinGW 8.1 I get the following after running ctest -j 40 99% tests passed, 35 tests failed out of 2631 Change-Id: I2c3ce7940b036e52ef393feab5837886355e7b5a Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake build: Add option for disabling build of executableEike Ziller2019-05-291-0/+20
| | | | | | | | | | So the package build can later easily separate sdktool and windows debugging helpers etc. Add a extend_qtc_executable similar to extend_qtc_plugin Change-Id: Ie790e86e12b0fed41c912e8205a273ac857f3854 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake build: Fix qtc_extend_plugin if plugin is disabled by CONDITIONEike Ziller2019-05-281-2/+8
| | | | | | | | | It should be a no-op in that case, but still error if the plugin target name passed to qtc_extend_plugin is wrong. Change-Id: I97579e658d4b42108fbc2600aad550c6a7b7f11b Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: Save a list of known Qt Creator specific targetsTobias Hunger2019-05-271-0/+19
| | | | | | | This list can be used to decide whether a target should be known. Change-Id: I09f1d693c38974fff04c514abe52cac740e53c46 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CMake build: Use add_qtc_depends for all add_qtc_* functionsCristian Adam2019-05-241-45/+26
| | | | | | | Also added current source directory as public include directory. Change-Id: I6a23e02b84be3fc5f29ac33ef8ccd7d70a48f494 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CMake build: Read QTC_BUILD_PLUGIN_${NAME} environment as defaultEike Ziller2019-05-241-1/+5
| | | | | | | | | | | | | | for BUILD_PLUGIN_${NAME}. This is only used as the default for the CMake cache, so only if you haven't run CMake before. The disadvantage is that just changing the environment variable after the fact will not change anything. The advantage is that the CMake cache keeps reflecting the actual state, which is great for ccmake, the UI in Qt Creator, and other configuration tools. Change-Id: I25448270c29afa31d240072f58f981b8776597f2 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake build: Add ability to disable building of individual pluginsEike Ziller2019-05-231-20/+78
| | | | | | | | | | | | | | Adds a cache entry "BUILD_PLUGIN_${NAME}", defaulting to ON which can be set to OFF to disable building of a plugin. Adds a extend_qtc_plugin function that should be used to add properties to a plugin after add_qtc_plugin, instead of the standard CMake functions target_... . The new function results in a no-op if the plugin was disabled. Change-Id: I57f6799620aea0aaa8b56acead4815ccced95911 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* CMake build: Fix compilation of testsEike Ziller2019-05-221-6/+8
| | | | | | | | Some more explicit mocs needed on macOS/Clang Change-Id: I0d26f499c4abe70a3fd625752bb28f86a023cd36 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Qt Creator CMake portCristian Adam2019-05-171-0/+431
Based on Tobias Hunger's work from a few months ago. The CMake configuration needs libclang and Qt paths specified as CMAKE_PREFIX_PATH. Auto tests are run with "ctest". At the moment the pass rate is 87%. Change-Id: Iba98e39bf22077d52706dce6c85986be67a6eab0 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>