Merge pull request #11401 from exoson:livestitch
[platform/upstream/opencv.git] / cmake / OpenCVGenHeaders.cmake
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
6 # platform-specific config file
7 ocv_compiler_optimization_fill_cpu_config()
8 configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/cv_cpu_config.h.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cv_cpu_config.h")
9
10 # ----------------------------------------------------------------------------
11 #  opencv_modules.hpp based on actual modules list
12 # ----------------------------------------------------------------------------
13 set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "")
14
15 set(OPENCV_MOD_LIST ${OPENCV_MODULES_PUBLIC})
16 ocv_list_sort(OPENCV_MOD_LIST)
17 foreach(m ${OPENCV_MOD_LIST})
18   string(TOUPPER "${m}" m)
19   set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE}#define HAVE_${m}\n")
20 endforeach()
21
22 set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE}\n")
23
24 #set(OPENCV_MOD_LIST ${OPENCV_MODULES_DISABLED_USER} ${OPENCV_MODULES_DISABLED_AUTO} ${OPENCV_MODULES_DISABLED_FORCE})
25 #ocv_list_sort(OPENCV_MOD_LIST)
26 #foreach(m ${OPENCV_MOD_LIST})
27 #  string(TOUPPER "${m}" m)
28 #  set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE}#undef HAVE_${m}\n")
29 #endforeach()
30
31 configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/opencv_modules.hpp.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp")
32 install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev)