[scqb] Generating the Native Build Project

In this sesssion, I will show you how generate the native build project defined in CMakeList.txt.
1.  Open the “cmake-gui” then click “Browse Source” to fill “Where is the source code” field. Then, click “Browse build” to fill “Where to build the binaries” as shown in Figure 1.
2. Click “configure” and select your compiler. In this tutorial, external libraries (Boost and QT) binaries are “MSVC-12.0” on windows and “GCC” on Linux. Thus, to make this tutorial working. For Windows, please select “Visual Studio 12 2013” (or “Visual Studio 12 2013 Win64” for 64 bit built. ). For Linux, please select “Unix Makefiles” as shown in Figure 2.

Figure 1 A CMake GUI



Figure 2 Selecting generator. Left: Unix Makefiles, Right: Visual Studio.


3. Click “Configure” again, and then click “Generate”. If everything was setup correctly, you should see the message like these. See Figure 3.

Figure 3 The Configuration done message

For those who want to build with the command line, create a new folder and cd to that folder. That folder is the “Where to build the binaries” folder. Then, type
>cmake -G "Visual Studio 12 2013" .\SimpleApp



No comments:

Post a Comment