Search code examples
windowscmake

Overview CMAKE_SYSTEM_VERSION values for Windows


I'm not a Windows user but work on supporting our C++ software also for Windows.

I would like to know the Windows version (7, 10, 11).

cmake gives for the system I have remote terminal access to and which shall be Windows 11 with current updates (Oct 2023) the values

CMAKE_SYSTEM_NAME="Windows"
CMAKE_SYSTEM_VERSION="10.0.22621"
CCMAKE_SYSTEM_PROCESSOR="AMD64"

Is there a list on how to decode Windows 10 and 11 from CMAKE_SYSTEM_VERSION?


Solution

  • Is there a list on how to decode Windows 10 and 11 from CMAKE_SYSTEM_VERSION?

    The value 22621 in 10.0.22621 corresponds to the Windows 11 build version for the Windows 11 version 23H2. See Windows 11 Release Information.

    Microsoft also provides build versions for Windows 10. See Windows 10 Release Information.

    There are also some secondary sources of this info. You can check Wikipedia's articles on Windows 11 version history and Windows 10 version history.