init.cmake 1.1 KB

1234567891011121314151617181920212223242526272829
  1. if(PROJECT_NAME STREQUAL "OpenCV")
  2. set(ENABLE_PLUGINS_DEFAULT ON)
  3. if(EMSCRIPTEN OR IOS OR WINRT)
  4. set(ENABLE_PLUGINS_DEFAULT OFF)
  5. endif()
  6. set(DNN_PLUGIN_LIST "" CACHE STRING "List of DNN backends to be compiled as plugins (openvino, etc or special value 'all')")
  7. set(DNN_ENABLE_PLUGINS "${ENABLE_PLUGINS_DEFAULT}" CACHE BOOL "Allow building and using of DNN plugins")
  8. mark_as_advanced(DNN_PLUGIN_LIST DNN_ENABLE_PLUGINS)
  9. string(REPLACE "," ";" DNN_PLUGIN_LIST "${DNN_PLUGIN_LIST}") # support comma-separated list (,) too
  10. string(TOLOWER "${DNN_PLUGIN_LIST}" DNN_PLUGIN_LIST)
  11. if(NOT DNN_ENABLE_PLUGINS)
  12. if(DNN_PLUGIN_LIST)
  13. message(WARNING "DNN: plugins are disabled through DNN_ENABLE_PLUGINS, so DNN_PLUGIN_LIST='${DNN_PLUGIN_LIST}' is ignored")
  14. set(DNN_PLUGIN_LIST "")
  15. endif()
  16. else()
  17. # Make virtual plugins target
  18. if(NOT TARGET opencv_dnn_plugins)
  19. add_custom_target(opencv_dnn_plugins ALL)
  20. endif()
  21. endif()
  22. endif()
  23. #
  24. # Detect available dependencies
  25. #
  26. # OpenVINO - detected by main CMake scripts (shared with G-API)