Creating Solution Files - QuanergySystems/quanergy_client GitHub Wiki
Creating Solution Files
Configure CMake to convert cmake files into Visual Studio solutions, as follows.
NOTE: CMake uses forward slashes in its filepaths.
-
Open the CMake application from the Microsoft Start menu or by double-clicking the CMake icon
installed on the dock. -
In the CMake window (Figure 36), set two specific directories:
-
In the Where is the source code field, type or Browse to the path for the quanergy_client:
C:/quanergy_client-master -
In the Where to build the binaries field, type or Browse the filepath to the Build folder:
C:/quanergy_client-master/Build -
Click the Configure button.
Figure 36. CMake Set Filepaths and Add Entries
-
In the CMake window’s menu bar, click the Add Entry button (Figure 36).
-
In the Add Cache Entry window that appears (Figure 37), repeat the following steps for each applicable variable defined in Table 1:
- In the Name field, type the name.
- In the Type pull-down menu, select
PATHorBOOL. - In the Value field, enter the value, which is a filepath or a checkmark (for true).
- Click the OK button to save the variable definition and put away the window.
- In the CMake window, click the Configure button (Figure 36).
Figure 37. CMake Add Cache Entry Window with BOOL Type (left), PATH Type (right)
Table 1. Variable Definitions for Boost Installation
| Name | Type | Value | Example |
|---|---|---|---|
| Boost_USE_STATIC_LIBS | BOOL | ✔ (Check the Boolean check box for True) | Figure 37 left |
| BOOST_LIBRARYDIR | PATH | C:/Program Files/PCL 1.8.0/3rdParty/Boost/lib | |
| BOOST_INCLUDEDIR | PATH | C:/Program Files/PCL 1.8.0/3rdParty/Boost/include/boost-1_61 | Figure 37 right |
- For first-time users, or when the
Buildfolder is empty, the Specify the generator window pops up (Figure 38).
- Click and drag the pull-down menu to specify the appropriate generator:
- For Visual Studio 2015, select Visual Studio 14 2015 Win64
- For Visual Studio 2013, select Visual Studio 12 2013 Win64
-
Select the Use default native compilers radio button.
-
Click the Finish button (Figure 38) to apply the selections and close the window.
Figure 38. CMake Specify the Generator Window
-
Observe that the configuration takes place so that values and any warnings are updated and displayed in red in the lower section of the CMake window (Figure 39).
-
Click the Generate button in the CMake window (Figure 39) to build the solution files of
quanergy_clientfor Visual Studio. They are automatically saved in theBuildfolder. -
Click the X button in the upper right corner to quit CMake.
Figure 39. CMake Configure Libraries