windows_uwp.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. Copyright James E. King III, 2017
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt)
  6. */
  7. #ifndef BOOST_PREDEF_PLAT_WINDOWS_UWP_H
  8. #define BOOST_PREDEF_PLAT_WINDOWS_UWP_H
  9. #include <boost/predef/make.h>
  10. #include <boost/predef/os/windows.h>
  11. #include <boost/predef/version_number.h>
  12. /* tag::reference[]
  13. = `BOOST_PLAT_WINDOWS_UWP`
  14. http://docs.microsoft.com/windows/uwp/[Universal Windows Platform]
  15. is available if the current development environment is capable of targeting
  16. UWP development.
  17. [options="header"]
  18. |===
  19. | {predef_symbol} | {predef_version}
  20. | `+__MINGW64_VERSION_MAJOR+` from `+_mingw.h+` | `>= 3`
  21. | `VER_PRODUCTBUILD` from `ntverp.h` | `>= 9200`
  22. |===
  23. */ // end::reference[]
  24. #define BOOST_PLAT_WINDOWS_UWP BOOST_VERSION_NUMBER_NOT_AVAILABLE
  25. #define BOOST_PLAT_WINDOWS_SDK_VERSION BOOST_VERSION_NUMBER_NOT_AVAILABLE
  26. #if BOOST_OS_WINDOWS
  27. // MinGW (32-bit), WinCE, and wineg++ don't have a ntverp.h header
  28. #if !defined(__MINGW32__) && !defined(_WIN32_WCE) && !defined(__WINE__)
  29. # include <ntverp.h>
  30. # undef BOOST_PLAT_WINDOWS_SDK_VERSION
  31. # define BOOST_PLAT_WINDOWS_SDK_VERSION BOOST_VERSION_NUMBER(0, 0, VER_PRODUCTBUILD)
  32. #endif
  33. // 9200 is Windows SDK 8.0 from ntverp.h which introduced family support
  34. #if ((BOOST_PLAT_WINDOWS_SDK_VERSION >= BOOST_VERSION_NUMBER(0, 0, 9200)) || \
  35. (defined(__MINGW64__) && __MINGW64_VERSION_MAJOR >= 3))
  36. # undef BOOST_PLAT_WINDOWS_UWP
  37. # define BOOST_PLAT_WINDOWS_UWP BOOST_VERSION_NUMBER_AVAILABLE
  38. #endif
  39. #endif
  40. #if BOOST_PLAT_WINDOWS_UWP
  41. # define BOOST_PLAT_WINDOWS_UWP_AVAILABLE
  42. # include <boost/predef/detail/platform_detected.h>
  43. # include <winapifamily.h> // Windows SDK
  44. #endif
  45. #define BOOST_PLAT_WINDOWS_UWP_NAME "Universal Windows Platform"
  46. #endif
  47. #include <boost/predef/detail/test.h>
  48. BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_UWP, BOOST_PLAT_WINDOWS_UWP_NAME)