Fixed dependencies for cmake status embeeded into opencv core
This commit is contained in:
parent
b7aacb6a93
commit
019122fba7
@ -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…
x
Reference in New Issue
Block a user