cmake: avoid unnecessary files creation in ocv_cmake_configure()

This commit is contained in:
Alexander Alekhin 2018-01-02 19:16:51 +00:00
parent 7abaae39ec
commit 94b236872c

View File

@ -32,8 +32,8 @@ function(ocv_cmake_eval var_name)
endfunction() endfunction()
macro(ocv_cmake_configure file_name var_name) macro(ocv_cmake_configure file_name var_name)
configure_file(${file_name} "${CMAKE_BINARY_DIR}/CMakeConfig-${var_name}.cmake" ${ARGN}) file(READ "${file_name}" __config)
file(READ "${CMAKE_BINARY_DIR}/CMakeConfig-${var_name}.cmake" ${var_name}) string(CONFIGURE "${__config}" ${var_name} ${ARGN})
endmacro() endmacro()
macro(ocv_update VAR) macro(ocv_update VAR)