OpenCVGenHeaders.cmake 1.8 KB

1234567891011121314151617181920212223242526272829303132
  1. # platform-specific config file
  2. configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/cvconfig.h.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h")
  3. configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/cvconfig.h.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/cvconfig.h")
  4. install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev)
  5. # platform-specific config file
  6. ocv_compiler_optimization_fill_cpu_config()
  7. configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/cv_cpu_config.h.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cv_cpu_config.h")
  8. # ----------------------------------------------------------------------------
  9. # opencv_modules.hpp based on actual modules list
  10. # ----------------------------------------------------------------------------
  11. set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "")
  12. set(OPENCV_MOD_LIST ${OPENCV_MODULES_PUBLIC})
  13. ocv_list_sort(OPENCV_MOD_LIST)
  14. foreach(m ${OPENCV_MOD_LIST})
  15. string(TOUPPER "${m}" m)
  16. set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE}#define HAVE_${m}\n")
  17. endforeach()
  18. set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE}\n")
  19. #set(OPENCV_MOD_LIST ${OPENCV_MODULES_DISABLED_USER} ${OPENCV_MODULES_DISABLED_AUTO} ${OPENCV_MODULES_DISABLED_FORCE})
  20. #ocv_list_sort(OPENCV_MOD_LIST)
  21. #foreach(m ${OPENCV_MOD_LIST})
  22. # string(TOUPPER "${m}" m)
  23. # set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE}#undef HAVE_${m}\n")
  24. #endforeach()
  25. configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/opencv_modules.hpp.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp")
  26. install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev)