From 9a9a306d5a3e74fdb4a0881b01c657a2197258ad Mon Sep 17 00:00:00 2001 From: Eugene Shalygin Date: Wed, 15 Mar 2017 13:54:57 +0100 Subject: [PATCH] Mention CMake suport in Visual Studio 2017 --- Compiling-with-CMake.mediawiki | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Compiling-with-CMake.mediawiki b/Compiling-with-CMake.mediawiki index d922ac2..14b4e32 100644 --- a/Compiling-with-CMake.mediawiki +++ b/Compiling-with-CMake.mediawiki @@ -13,7 +13,7 @@ Things will be easier if you install all the dependencies into the same prefix, CMake encourage you to use so called out-of-source builds (i.e. build into a different directory than the one with source files). In fact, CMake does not even provide a "clean" command to remove generated files --- you simply delete the build directory (do not confuse with a "clean" command of the build system, which removes files, generatad during a build, this CMake does provide). You may have different build directories, configured with options (see below). And, of course, you do not pollute your sources, that are always ready for git diff. == Configuring and generating build files == -CMake does not build a project by itself. Instead it generates rules for an actual build software. These generators include traditional makefiles as well as other platform-specific (like XCode or Visual Studio) or not (Ninja) build tools. At the same time CMake projects can be integrated with IDEs. This is done in two ways: either CMake generates project files, which include call to CMake itself to update those files if needed, or an IDE may load CMake project structure directly. The generators for Visual Studio and XCode implement the former approach, while Qt Creator and KDevelop use the latter model. Before continuing you have to decide which generator you will use and will you integrate with an IDE or not. You may get a list of available generators running cmake -G or cmake --help +CMake does not build a project by itself. Instead it generates rules for an actual build software. These generators include traditional makefiles as well as other platform-specific (like XCode or Visual Studio) or not (Ninja) build tools. At the same time CMake projects can be integrated with IDEs. This is done in two ways: either CMake generates project files, which include call to CMake itself to update those files if needed, or an IDE may load CMake project structure directly. The generators for Visual Studio and XCode implement the former approach, while Qt Creator, KDevelop and Visual Studio 2017 use the latter model. Before continuing you have to decide which generator you will use and will you integrate with an IDE or not. You may get a list of available generators running cmake -G or cmake --help === IDE Support === ;Qt Creator : This IDE can just open the top-level project CMakeLists.txt file and load the project structure. Then it will ask you where to put build files and which make tool to use. Please note that Ninja will give you significantly shorter rebuild times, as comparing to a regular make. From version 4.3 of Qt Creator and 3.7 of CMake, support is excellent (see this [http://blog.qt.io/blog/2016/11/15/cmake-support-in-qt-creator-and-elsewhere/ blog post] for details). @@ -22,7 +22,7 @@ CMake does not build a project by itself. Instead it generates rules for an actu ;XCode : You have to use "XCode" generator to generate project files. Then when any of the CMake project files get updated, the next build command will re-generate the XCode projects and XCode will reload them. ;Visual Studio -: You have to use "Visual Studio" generator to generate project files. Then when any of the CMake project files get updated, the next build command will re-generate the projects files and Visual Studio will ask to reload them. +: Full integration from 2017 version, otherwise you have to use "Visual Studio" generator to generate project files. Then when any of the CMake project files get updated, the next build command will re-generate the projects files and Visual Studio will ask to reload them. With the generator selected, you have to do one of the following: ;No IDE @@ -32,7 +32,7 @@ With the generator selected, you have to do one of the following: ;Visual Studio : Create build directory. This directory will contain Visual Studio project files as well. Cd into that directory and issue a command: : cmake -G "Visual Studio xxxx" -D -D . If your build directory is as above (build/debug), the command may be: -: cmake -G "Visual Studio 2015" -DQT5=ON -DSYSTEM_QTSINGLEAPPLICATION=ON ../... For the list of supported by qBittorrent and CMake options (and where to look them up) see below. +: cmake -G "Visual Studio 2015" -DSYSTEM_QTSINGLEAPPLICATION=ON ../... For the list of supported by qBittorrent and CMake options (and where to look them up) see below. ;XCode : Same as for Visual Studio, replace generator with "XCode". ;KDevelop, Qt Creator