Fixed dependencies for cmake status embeeded into opencv core

pull/13383/head
Andrey Kamaev 13 years ago
parent b7aacb6a93
commit 019122fba7
  1. 2
      CMakeLists.txt
  2. 9
      cmake/OpenCVUtils.cmake
  3. 8
      modules/core/CMakeLists.txt

@ -938,6 +938,8 @@ status(" cvconfig.h is in:" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}")
status("-----------------------------------------------------------------")
status("")
ocv_finalize_status()
# ----------------------------------------------------------------------------
# Warn in the case of in-source build
# ----------------------------------------------------------------------------

@ -113,6 +113,15 @@ function(ocv_output_status msg)
file(APPEND "${OPENCV_BUILD_INFO_FILE}" "\"${msg}\\n\"\n")
endfunction()
macro(ocv_finalize_status)
if(NOT OPENCV_SKIP_STATUS_FINALIZATION)
if(TARGET opencv_core)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${OPENCV_BUILD_INFO_FILE}" "${opencv_core_BINARY_DIR}/version_string.inc" OUTPUT_QUIET)
endif()
endif()
endmacro()
# Status report function.
# Automatically align right column and selects text based on condition.
# Usage:

@ -16,13 +16,7 @@ else()
set(cuda_link_libs "")
endif()
set(OPENCV_VERSION_FILE "${opencv_core_BINARY_DIR}/version_string.inc")
add_custom_command(OUTPUT "${OPENCV_VERSION_FILE}"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${OPENCV_BUILD_INFO_FILE}" "${OPENCV_VERSION_FILE}"
MAIN_DEPENDENCY "${OPENCV_BUILD_INFO_FILE}"
COMMENT "")
ocv_glob_module_sources(SOURCES ${lib_cuda} ${cuda_objs} "${OPENCV_VERSION_FILE}")
ocv_glob_module_sources(SOURCES ${lib_cuda} ${cuda_objs} "${opencv_core_BINARY_DIR}/version_string.inc")
ocv_create_module(${cuda_link_libs})
ocv_add_precompiled_headers(${the_module})

Loading…
Cancel
Save