CMakeLists.txt 611 B

1234567891011121314151617181920212223
  1. if(NOT PYTHON3_INCLUDE_PATH OR NOT PYTHON3_NUMPY_INCLUDE_DIRS)
  2. ocv_module_disable(python3)
  3. endif()
  4. # Problem in numpy >=1.15 <1.17
  5. if(PYTHON3_LIMITED_API
  6. AND NOT PYTHON3_NUMPY_VERSION VERSION_LESS "1.15"
  7. AND PYTHON3_NUMPY_VERSION VERSION_LESS "1.17"
  8. )
  9. message(WARNING "Current NUMPY version (${PYTHON3_NUMPY_VERSION}) is not compatible with LIMITED_API.")
  10. set(PYTHON3_LIMITED_API OFF)
  11. endif()
  12. set(the_description "The python3 bindings")
  13. set(MODULE_NAME python3)
  14. set(MODULE_INSTALL_SUBDIR python3)
  15. set(PYTHON PYTHON3)
  16. include(../common.cmake)
  17. unset(MODULE_NAME)
  18. unset(MODULE_INSTALL_SUBDIR)