Building a CMake project involves three phases:
In Visual Studio the build phase occurs when you select the menu item Build/Build All, whereas the install phase occurs when you select the menu item Build/Install <project>.
To confuse things a bit, it's common to use cmake to run the build and install steps, such as in the following windows batch file:
cmake -G "Ninja" ^
-DBUILD_SHARED_LIBS=%SHARED_LIBS% ^
-DCMAKE_INSTALL_PREFIX:PATH="install" ^
-DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT_DIR%/scripts/buildsystems/vcpkg.cmake" ^
-DVCPKG_TARGET_TRIPLET=%TRIPLET% ^
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS="TRUE" ^
-DCMAKE_CXX_COMPILER=%WINDOWS_COMPILER% ^
-DCMAKE_C_COMPILER=%WINDOWS_COMPILER% ^
-DCMAKE_BUILD_TYPE="%CONFIG%" ^
-DCMAKE_MAKE_PROGRAM=ninja ^
--config %CONFIG% ^
"%SOURCE%"
cmake --build . --target install --config %CONFIG%