From b75b0c822df00ff02109920e147d9aa2a06dc8c4 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Fri, 12 Dec 2014 18:47:41 +0300 Subject: [PATCH] install test data on Windows platform too --- CMakeLists.txt | 10 ++++++++++ data/CMakeLists.txt | 10 +--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a9a0ce13..03e8d1afd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -294,6 +294,16 @@ if(NOT OPENCV_TEST_INSTALL_PATH) set(OPENCV_TEST_INSTALL_PATH "${OPENCV_BIN_INSTALL_PATH}") endif() +if(OPENCV_TEST_DATA_PATH AND NOT OPENCV_TEST_DATA_INSTALL_PATH) + if(ANDROID) + set(OPENCV_TEST_DATA_INSTALL_PATH "sdk/etc/testdata") + elseif(WIN32) + set(OPENCV_TEST_DATA_INSTALL_PATH "testdata") + else() + set(OPENCV_TEST_DATA_INSTALL_PATH "share/OpenCV/testdata") + endif() +endif() + if(ANDROID) set(LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/lib/${ANDROID_NDK_ABI_NAME}") set(3P_LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/3rdparty/lib/${ANDROID_NDK_ABI_NAME}") diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 998e78520..269311251 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -10,13 +10,5 @@ elseif(NOT WIN32) endif() if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH) - if(ANDROID) - install(DIRECTORY ${OPENCV_TEST_DATA_PATH} DESTINATION sdk/etc/testdata COMPONENT tests) - elseif(NOT WIN32) - # CPack does not set correct permissions by default, so we do it explicitly. - install(DIRECTORY ${OPENCV_TEST_DATA_PATH} - DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE - GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - DESTINATION share/OpenCV/testdata COMPONENT tests) - endif() + install(DIRECTORY "${OPENCV_TEST_DATA_PATH}/" DESTINATION "${OPENCV_TEST_DATA_INSTALL_PATH}" COMPONENT "tests") endif() \ No newline at end of file