Commit 35308bc4 authored by Alexander Alekhin's avatar Alexander Alekhin

cmake: fix CMake error

"install DIRECTORY does not allow "COMPONENT" after PATTERN or REGEX."
parent 07004a46
......@@ -1098,16 +1098,16 @@ endfunction()
macro(ocv_add_testdata basedir dest_subdir)
if(BUILD_TESTS)
cmake_parse_arguments(__TESTDATA "" "COMPONENT" "" ${ARGN})
if(NOT CMAKE_CROSSCOMPILING AND NOT INSTALL_TESTS)
file(COPY ${basedir}/
DESTINATION ${CMAKE_BINARY_DIR}/${OPENCV_TEST_DATA_INSTALL_PATH}/${dest_subdir}
${__TESTDATA_UNPARSED_ARGUMENTS}
${ARGN}
)
endif()
if(INSTALL_TESTS)
install(DIRECTORY ${basedir}/
DESTINATION ${OPENCV_TEST_DATA_INSTALL_PATH}/contrib/text
COMPONENT "tests"
${ARGN}
)
endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment