OpenCV-WinRT.cmake 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. set(WINRT TRUE)
  2. add_definitions(-DWINRT -DNO_GETENV)
  3. # Making definitions available to other configurations and
  4. # to filter dependency restrictions at compile time.
  5. if(WINDOWS_PHONE)
  6. set(WINRT_PHONE TRUE)
  7. add_definitions(-DWINRT_PHONE)
  8. elseif(WINDOWS_STORE)
  9. set(WINRT_STORE TRUE)
  10. add_definitions(-DWINRT_STORE)
  11. endif()
  12. if(CMAKE_SYSTEM_VERSION MATCHES 10)
  13. set(WINRT_10 TRUE)
  14. add_definitions(-DWINRT_10)
  15. add_definitions(/DWINVER=_WIN32_WINNT_WIN10 /DNTDDI_VERSION=NTDDI_WIN10 /D_WIN32_WINNT=_WIN32_WINNT_WIN10)
  16. elseif(CMAKE_SYSTEM_VERSION MATCHES 8.1)
  17. set(WINRT_8_1 TRUE)
  18. add_definitions(-DWINRT_8_1)
  19. add_definitions(/DWINVER=_WIN32_WINNT_WINBLUE /DNTDDI_VERSION=NTDDI_WINBLUE /D_WIN32_WINNT=_WIN32_WINNT_WINBLUE)
  20. elseif(CMAKE_SYSTEM_VERSION MATCHES 8.0)
  21. set(WINRT_8_0 TRUE)
  22. add_definitions(-DWINRT_8_0)
  23. add_definitions(/DWINVER=_WIN32_WINNT_WIN8 /DNTDDI_VERSION=NTDDI_WIN8 /D_WIN32_WINNT=_WIN32_WINNT_WIN8)
  24. else()
  25. message(STATUS "Unsupported WINRT version (consider upgrading OpenCV): ${CMAKE_SYSTEM_VERSION}")
  26. endif()
  27. set(OPENCV_DEBUG_POSTFIX "")