Cannot specify WINAPI version to build against
With b2 i can specify the Windows API version to build against with e.g. define=BOOST_USE_WINAPI_VERSION=0x0601 but unless i miss something this cannot be done for the CMake build.
@Lastique what do you think about this? A CMake option in winapi comes to mind.
In my libraries, I'm mirroring C++ defines to CMake options, so one would specify e.g. -DBOOST_USE_WINAPI_VERSION=0x0601 in cmake command line and that translates to the equivalent C++ define. I'll add this in Boost.WinAPI's CMakeLists.txt.
Done in https://github.com/boostorg/winapi/commit/c5fb9c86e8b9ea460fc6d7255d15d69d4d2705ae.
Not sure if this is the right place for this nor am i involved with boost and know their policies, but looking at the cache variables, it looks like they are following the form BOOST_<LIBRARY>_FOO_BAR. Your introduced variable does violate this form, a valid variant would look like BOOST_WINAPI_USE_WINAPI_VERSION.
That's OK because it mirrors the macro name.
The intention was that BOOST_USE_WINAPI_VERSION would be a Boost-wide macro that affects all libraries using Windows API.