[CMake] Windows Version in HEX

Michael Wild themiwi at gmail.com
Thu Feb 18 18:03:02 EST 2010


On 18. Feb, 2010, at 23:34 , Aaron_Wright at selinc.com wrote:

> I have a boost::asio library that wants _WIN32_WINNT or _WIN32_WINDOWS 
> defined to the hex version of windows, like 0x0501 for windows xp. I can 
> get 5.1 from CMAKE_SYSTEM_VERSION, but is there a hex version, or do I 
> have to do some converting myself?
> 
> -------------------------------------------------------------
> Aaron Wright


That macro should be set to the minimum Windows version your software is going to run on, this is not necessarily the same number as CMAKE_SYSTEM_VERSION. I think that's probably something you should/can hard-code, since it indicates the minimum version of Windows you require API-wise.

HTH

Michael



More information about the CMake mailing list