Skip to content

CMake global notes

Visual studio platform and vesion selection

Visual studio version selection through cmake command line:

Visual Studio versionCommandPlatform
2017Visual Studio 15 2017-A Win32/x64/ARM/ARM64
2019Visual Studio 16 2019-A Win32/x64/ARM/ARM64
2022Visual Studio 17 2022-A Win32/x64/ARM/ARM64

With environment variable:

sh
export CMAKE_GENERATOR_PLATFORM="Visual Studio 17 2022"

With argument:

sh
cmake -G "Visual Studio 17 2022" -A Win32/x64/ARM/ARM64