windows_uwp.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. /*`
  13. [heading `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. [table
  18. [[__predef_symbol__] [__predef_version__]]
  19. [[`__MINGW64_VERSION_MAJOR` from `_mingw.h`] [`>= 3`]]
  20. [[`VER_PRODUCTBUILD` from `ntverp.h`] [`>= 9200`]]
  21. ]
  22. */
  23. #define BOOST_PLAT_WINDOWS_UWP BOOST_VERSION_NUMBER_NOT_AVAILABLE
  24. #define BOOST_PLAT_WINDOWS_SDK_VERSION BOOST_VERSION_NUMBER_NOT_AVAILABLE
  25. #if BOOST_OS_WINDOWS
  26. // MinGW (32-bit) has no ntverp.h header
  27. #if !defined(__MINGW32__)
  28. # include <ntverp.h>
  29. # undef BOOST_PLAT_WINDOWS_SDK_VERSION
  30. # define BOOST_PLAT_WINDOWS_SDK_VERSION BOOST_VERSION_NUMBER(0, 0, VER_PRODUCTBUILD)
  31. #endif
  32. // 9200 is Windows SDK 8.0 from ntverp.h which introduced family support
  33. #if ((BOOST_PLAT_WINDOWS_SDK_VERSION >= BOOST_VERSION_NUMBER(0, 0, 9200)) || \
  34. (defined(__MINGW64__) && __MINGW64_VERSION_MAJOR >= 3))
  35. # undef BOOST_PLAT_WINDOWS_UWP
  36. # define BOOST_PLAT_WINDOWS_UWP BOOST_VERSION_NUMBER_AVAILABLE
  37. #endif
  38. #endif
  39. #if BOOST_PLAT_WINDOWS_UWP
  40. # define BOOST_PLAT_WINDOWS_UWP_AVAILABLE
  41. # include <boost/predef/detail/platform_detected.h>
  42. # include <winapifamily.h> // Windows SDK
  43. #endif
  44. #define BOOST_PLAT_WINDOWS_UWP_NAME "Universal Windows Platform"
  45. #endif
  46. #include <boost/predef/detail/test.h>
  47. BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_UWP, BOOST_PLAT_WINDOWS_UWP_NAME)