diff options
author | Cristian Adam <cristian.adam@qt.io> | 2019-11-21 13:14:21 +0100 |
---|---|---|
committer | Cristian Adam <cristian.adam@qt.io> | 2019-11-21 13:59:20 +0000 |
commit | a646d0af261cadbfd5d97c3a188e6b5facf86f25 (patch) | |
tree | e9a5be6c358b350eef312f6969e073bbf8a35f46 /README.md | |
parent | 7e8e6bcba17fcae3428f2052e237e3d4dfefd4ed (diff) |
Documentation: Add documentation how to build Qt Creator with CMake
Change-Id: I36617ce09301165f2e18a7524a18283264957ac6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 50 |
1 files changed, 45 insertions, 5 deletions
@@ -31,6 +31,7 @@ Prerequisites: * ActiveState Active Perl * MinGW with g++ 5.3 or Visual Studio 2017 or later * jom + * Ninja (optional, needed for CMake) * Python 3.5 or later (optional, needed for the python enabled debug helper) * On Mac OS X: latest Xcode * On Linux: g++ 5.3 or later @@ -38,7 +39,7 @@ Prerequisites: Clang PCH Manager and Clang Refactoring plugins, see the section "Get LLVM/Clang for the Clang Code Model". The LLVM C++ API provides no compatibility garantee, so if later versions don't compile we don't support that version.) -* CMake (only for manual builds of LLVM/Clang) +* CMake (for manual builds of LLVM/Clang, and Qt Creator itself) * Qbs 1.7.x (optional, sources also contain Qbs itself) The installed toolchains have to match the one Qt was compiled with. @@ -264,13 +265,24 @@ http://llvm.org/docs/GettingStarted.html#git-mirror: For Linux/macOS: - cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DCMAKE_INSTALL_PREFIX=<installation location> ../llvm-project/llvm - make install + cmake \ + -D CMAKE_BUILD_TYPE=Release \ + -D LLVM_ENABLE_RTTI=ON \ + -D LLVM_ENABLE_PROJECTS="clang;clang-tools-extra" \ + -D CMAKE_INSTALL_PREFIX=<installation location> \ + ../llvm-project/llvm + cmake --build . --target install For Windows: - cmake -G "NMake Makefiles JOM" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DCMAKE_INSTALL_PREFIX=<installation location> ..\llvm-project\llvm - jom install + cmake ^ + -G "NMake Makefiles JOM" ^ + -D CMAKE_BUILD_TYPE=Release ^ + -D LLVM_ENABLE_RTTI=ON ^ + -D LLVM_ENABLE_PROJECTS="clang;clang-tools-extra" ^ + -D CMAKE_INSTALL_PREFIX=<installation location> ^ + ..\llvm-project\llvm + cmake --build . --target install ### Clang-Format @@ -282,6 +294,34 @@ While the plugin builds without it, it will be disabled on start with an error m Note that the plugin is disabled by default. +### Building Qt Creator with CMake + +Qt Creator can also be built with CMake. The main Qt Creator dependencies, Qt and LLVM/Clang, both +offer CMake find packages, which reduce the steps of configuring Qt Creator to a minimum. + + Configure and build Qt Creator: + + mkdir build + cd build + + For Linux/macOS: + + cmake \ + -G Ninja \ + -D CMAKE_BUILD_TYPE=Release \ + -D CMAKE_PREFIX_PATH=~/Qt/5.12.5/gcc_64;~/llvm \ + ../qt-creator + cmake --build . + + For Windows: + + cmake ^ + -G Ninja ^ + -D CMAKE_BUILD_TYPE=Release ^ + -D CMAKE_PREFIX_PATH=c:\Qt\5.12.5\msvc2017_64;c:\llvm ^ + ..\qt-creator + cmake --build . + ## Third-party Components Qt Creator includes the following third-party components, |