aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
Commit message (Collapse)AuthorAgeFilesLines
* cmake build/macOS: Fix installing when built with Qt6Eike Ziller2020-11-181-1/+2
| | | | | | | | | | | | | | | | | | In a framework the actual library can be accessed via two different paths: - Foo.framework/Foo - Foo.framework/Versions/A/Foo It happens that Qt5 exports the first variant for the framework LOCATION and Qt6 exports the second variant. We want to cut the whole "Foo.framework" part for the framework's location, so actually do that. Amends 98db9774f2363314f51b1732646396112418320e Change-Id: Idad12e92f2bfbdc480256a832320c4dec76a0e5f Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* cmake build: Create DebugInfo component with separate debug infoEike Ziller2020-11-173-0/+182
| | | | | | | | | | | 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 building with PCHsEike Ziller2020-11-161-2/+4
| | | | | | | | | | | - fix target name - build pchs without extensions like all other targets - require CMake 3.10 for plugins Amends c038abb0abc9c346d5041c4cbbe201905e2ac041 Change-Id: I0eae58a9e7ce91c0df6103790cb91a5229d06051 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake Build: Fix problems with PCH and super repoCristian Adam2020-11-131-7/+7
| | | | | | | | | | Make sure that every project will have its own precompile headers sets. This fixes problems with MSVC. Change-Id: I37d58c9652f679545283907e7cad70cd579911a8 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* cmake build: Use CMAKE_INSTALL_NAME_TOOL instead of hardcodingEike Ziller2020-11-131-2/+2
| | | | | | | Amends 98db9774f2363314f51b1732646396112418320e Change-Id: I4aaaddcfc0e5cc31bb0646a3a3ccc18ee2fa5ff1 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* cmake build: Do not copy whole app bundle directory when installingEike Ziller2020-11-131-6/+68
| | | | | | | | | | | CMake just copies the whole app bundle directory when installing a target, but we copy various things there that should not be part of the installation, like static libraries, executables with SKIP_INSTALL, Clang resources, and potentially .dSYM bundles. Fixes: QTCREATORBUG-24021 Change-Id: I98bb466b664d2d6d203f3adc20d8345d9b3ce3cc Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* yaml-cpp: Fix/suppress MSVC warningsOrgad Shaneh2020-11-121-0/+3
| | | | | | | | | | | | * C4251: 'YAML::Binary::m_data': class 'std::vector<unsigned char,std::allocator<unsigned char>>' needs to have dll-interface to be used by clients of class 'YAML::Binary' * C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'YAML::Exception' * STL4015: The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. Change-Id: I37e32df84ee2d2946181aad790dabd0c3ed58c08 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* cmake build: Map generic IMPORTED_LOCATION for Qt6 toolsEike Ziller2020-11-111-1/+1
| | | | | | | | | | There once was a time where the Qt6 build only set IMPORTED_LOCATION_<CONFIG> but nowadays it also sets IMPORTED_LOCATION. Use the latter to make it work with both debug and release builds of Qt6. Change-Id: Ic8b14209cb97b47eb6136e23390045e115a12ac0 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* cmake build: Remove branding from target namesEike Ziller2020-11-111-6/+6
| | | | | | | Targets are never branded Change-Id: If7f23ac005b5492d52f87ba71789e674bb077a00 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* cmake build: Fix brandingEike Ziller2020-11-091-5/+5
| | | | | | | | The cmake build used IDE_ID in too many paths that are actually not branded (yet?). Change-Id: I019dd806975ef2205aa946bc3b27b0675233e1ea Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* cmake build: Disable refactoringbackend and pchmanagerbackendEike Ziller2020-11-051-5/+18
| | | | | | | | | | | | | | | | | | Disable the libs and executables if not needed by either the plugins or by the tests. So far in the cmake build the ClangRefactoring and ClangPchManager plugins were disabled by default, but the backend executables were still built. With this change the executables are not built if the plugins are not enabled, like it is the case in the qmake build. To make it possible to build all the tests even though the plugins are disabled by default, the backend libraries are still built if tests are enabled. Change-Id: I3b61479525e1472a55215f1b003fea9facaf9e93 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* cmake build: Fix disabling of documentation targetsEike Ziller2020-11-051-1/+1
| | | | | Change-Id: I8827dcc38c908ef9e19b9a59bb9559d29b0ff77e Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* cmake build: Handle turning on/off libraries the same as pluginsEike Ziller2020-11-021-20/+25
| | | | | | | | | | | | | | | | Previously the library targets were added, but with EXCLUDE_FROM_ALL. This had the effect that libraries were not compiled if nothing depends on them, but lead to various issues: It wasn't possible to manually control compilation, and it lead to the library targets still being exported, leading to configuration errors when building external plugins. Implement the same mechanism with BUILD_LIBRARY_* as with plugins, giving complete control. Change-Id: Idea3371d130593c5c2fdceee374021b6923db0c9 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* cmake build: Fix documentation generation with Qt6Eike Ziller2020-11-021-0/+2
| | | | | | | | 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: Add missing rcc alias for Qt6Eike Ziller2020-10-301-1/+1
| | | | | Change-Id: I353ded95f8ee8fd263d7a9f830cdcf662a250bd1 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* TextEditor: Add missing file to dev packageEike Ziller2020-10-292-13/+16
| | | | | | | | | | | | The public header "textdocumentlayout.h" includes "State" from KSyntaxHighlighting, so we need to export that. Since it doesn't have the ".h" extension, it doesn't get exported automatically either. Add a generic function for adding such special public header files. Fixes: QTCREATORBUG-24413 Change-Id: I841e6d601df7e925f48eedcc2a28d6b43c00350e Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Bump version to 4.14 beta2Eike Ziller2020-10-291-3/+3
| | | | | Change-Id: Ife5666e272697da19e1ba1a96d93281943deb37e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* cmake build: Allow branding to change documentation fileEike Ziller2020-10-281-2/+4
| | | | | | Task-number: QTCREATORBUG-22488 Change-Id: I80a1feafa7b027dc99acdb019359037ae0259573 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* cmake build: Use qtc_add_resources for StudioWelcomeEike Ziller2020-10-271-13/+0
| | | | | | | Avoids creating resource file if plugin is disabled. Change-Id: Ia3e1a127c49cae4b03547367a78ca7dd8c3689f3 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Revert "cmake build: Disable clangpchmanagerbackend and refactoringbackend"Eike Ziller2020-10-271-6/+2
| | | | | | | | | | | | | | The change breaks the dev package: The imported target "QtCreator::clangrefactoringbackend_lib" references the file "/home/qt/work/build/qtc_build/lib/qtcreator/libclangrefactoringbackend_lib.a" but this file does not exist. This reverts commit 20a620745982368f71ac890dedfde6429d9e4e84. Change-Id: I68f3b6948bde611b9e5b841d1fde2b136877cbfc Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* cmake build: add qtc_add_resources to APIEike Ziller2020-10-271-0/+81
| | | | | | | | Adapted from qt6_add_resources. Takes a list of files and compiles these into a resource file. Change-Id: I375aa17b76e283b90bc0cbe8b6859520bcac7da3 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* cmake build: Disable clangpchmanagerbackend and refactoringbackendEike Ziller2020-10-261-2/+6
| | | | | | | | | By default. Previously only the corresponding plugins were disabled, but not even building the backends makes more sense. Change-Id: I36d61869a3050f37da1f480dea89e7539dda599a Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* cmake build: Add option for exporting pluginsEike Ziller2020-10-222-2/+40
| | | | | | | | | | | | | | 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: Fix export name in case of brandingEike Ziller2020-10-221-2/+2
| | | | | | | | We must use the same name everywhere for the export name, for simplicity stay with QtCreator, since this is not user-visible anyhow. Change-Id: I4f51982534662d46401dad1320eec3758eed055b Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake Build: Allow building unittests when targets are missingCristian Adam2020-10-201-1/+9
| | | | | | | | when configuring a minimal build make sure that when querying for target properties like SOURCE_DIR the target actually exists. Change-Id: Ib754b79be6461e3ddd4cdeb1abac123cf4535068 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CMake Build: Fix missing pythonXY.zip on MSVCCristian Adam2020-10-191-0/+79
| | | | | | | Ammends 94b9b33a17e3f7760cbbf9abd021984839106647 Change-Id: I531a648a108233fbefbe6878f65f8ab7186db39a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CMake Build: Fix PCH builds for non MSVC platformsCristian Adam2020-10-081-2/+1
| | | | | | | Ammends 2129a04c5d61d5a55a76045f2727e5b7f9048c6b Change-Id: I50fc1bf2e5ef4742243aa08a4e5ad2bfee459eb1 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* CMake Build: Fix MSVC PCH buildCristian Adam2020-10-071-1/+2
| | | | | | | | Ammends 735078cd805709ed08cefe5195ce0535f6b7acc7 Change-Id: I01296641ca0681d4fef376087368e247dce011f8 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake build: Create shared lib for shared part of qmlpuppetEike Ziller2020-10-061-10/+32
| | | | | | | Which is used by external plugins. Change-Id: I2d700c02ff3d4b2d692486bd64ef16449deffc4e Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake build: Add missing PROPERTIES to add_qtc_pluginEike Ziller2020-10-061-1/+1
| | | | | | | And use it for QmlDesigner Change-Id: Id7221ee2288159ff2faaf4ac483570034927f1b4 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake Build: Add option to build plugins, libraries, executables by defaultCristian Adam2020-10-011-3/+7
| | | | | | | | | You might want to build only a specific list of plugins, libraries, or executables by opting in, instead of building all of them and opting out. Change-Id: Ic81da380828779e409ba4192f307aa1b77a89808 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* CMake: Fix compilation error when QmlPlugin is not builtCristian Adam2020-09-251-1/+5
| | | | | | | Ammends 6fe11f80d62df7d9723b11ce9eae1ed1a790dc59 Change-Id: Ifa909d8e2946c4fdd8e2a5301bab2686a615d89a Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* CMake Build: Enable PCH for testsCristian Adam2020-09-211-0/+2
| | | | | | | | | Because the tests were missing the visibility flags, and PCH targets that didn't have the visibility flags were skipped, tests were build without PCH. Change-Id: I56ddc81fadcb9e1004032a7e6096ea2c0a480a19 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CMake build: Fix unittest linkageOrgad Shaneh2020-09-111-0/+3
| | | | | | | GoogleTest depends on pthread. Change-Id: I2ed93257a7c8fa73d47d51a3a0a4c25b2fb88dae Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake build: Make Qt6::Core5Compat available in a portable wayEike Ziller2020-09-071-0/+11
| | | | | | | | | | | 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: Qt6 build fixesEike Ziller2020-09-041-0/+1
| | | | | | | | | | 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: Check minimum Qt versionEike Ziller2020-09-032-2/+4
| | | | | Change-Id: I81244c2480d647a2cf48885b2a125a02b11767b4 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake build: Support building clang tooling without static libsEike Ziller2020-09-031-0/+14
| | | | | | | | | | | 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-251-6/+8
|\ | | | | | | Change-Id: Ib60df85a85fc1c94d8cc0dc23ea9fcdb4822bcab
| * CMake build system: Avoid duplicated include pathsAlessandro Portale2020-08-211-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Clean the paths before adding them to targets. This prevents the code completion from showing multiple identical entries when completing an #include. It also removes ~2MB from build.ninja. Task-number: QTCREATORBUG-24514 Change-Id: I19f3df400e65d8dfc4747415a8e14dae05d4b88c Reviewed-by: Cristian Adam <cristian.adam@qt.io>
| * Bump version to 4.13.0Eike Ziller2020-08-141-3/+3
| | | | | | | | | | Change-Id: Id1d2ebca1c2bca86683a3172bfe2f95123e1b897 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | CMake Build: Add Google Testing 1.10.x as submoduleCristian Adam2020-08-191-12/+16
| | | | | | | | | | | | | | Fixes: QTCREATORBUG-24510 Change-Id: I763d72524f2e581671e18bcd9cda42d5bf7bccdf Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | CMake: Use Qt5::DesignerComponentsTobias Hunger2020-08-101-69/+0
| | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/4.13' into masterEike Ziller2020-08-101-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri src/plugins/cmakeprojectmanager/cmakebuildstep.cpp src/plugins/cmakeprojectmanager/cmakebuildstep.h tests/auto/debugger/tst_namedemangler.cpp tests/auto/qml/codemodel/check/tst_check.cpp Change-Id: Iefd5f71c03c0078513b76a92af764a4fb22ee4c2
| * Bump version to 4.13.0-rc1Eike Ziller2020-07-271-3/+3
| | | | | | | | | | Change-Id: Icc4b98903a16d05d978ad27c2aeffac8dbf22227 Reviewed-by: David Schulz <david.schulz@qt.io>
| * CMake build: Fix configuring with CMake 3.10 and external yaml-cppEike Ziller2020-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | CMake 3.10 does not allow using target_include_directories with INTERFACE on imported targets. https://gitlab.kitware.com/cmake/cmake/-/issues/15689 Fixes: QTCREATORBUG-24356 Change-Id: I2427276f0851010cda2321c45eff0628713af2ff Reviewed-by: Cristian Adam <cristian.adam@qt.io>
| * Bump version to 4.13 beta2Eike Ziller2020-07-141-3/+3
| | | | | | | | | | Change-Id: I836987b4c4e28c65cb67c2efba595ed92d071b6a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | CMake: Replace QT_USE_FAST_{OPERATOR_PLUS,CONCATENTION} by QT_USE_QSTRINGBUILDEROrgad Shaneh2020-08-101-2/+1
| | | | | | | | | | | | | | Missed in commit 52b2ca55c9ba0cbb33099c88b529c046bb27a252 Change-Id: I1f1862e5ad8fd5a29c3e0a56adbc7960e538f441 Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/4.13'Eike Ziller2020-07-062-0/+7
|\| | | | | | | Change-Id: I015bac0cccdf466a923c706abdedd8bd8800b0cd
| * CMake Build: Ensure valid destinations for generated filesKnud Dollereder2020-07-012-0/+7
| | | | | | | | | | | | | | | | | | | | - Make the build system aware that empty_pch.c/.cpp are generated files to prevent invalid access from _add_pch_target. - Force the creation of the translation output directory before copying qm files into it. Change-Id: Iaff5e5ebdbfec7e89a47d277d95f9dec760a5b6b Reviewed-by: Eike Ziller <eike.ziller@qt.io>