diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt index 81c4f9161..1dc7ff294 100644 --- a/modules/dnn/CMakeLists.txt +++ b/modules/dnn/CMakeLists.txt @@ -27,8 +27,9 @@ ocv_add_perf_tests() # ---------------------------------------------------------------------------- # Download pre-trained models for complex testing on GoogLeNet and AlexNet # ---------------------------------------------------------------------------- -OCV_OPTION(${the_module}_DOWNLOAD_CAFFE_MODELS "Use GoogLeNet Caffe model for testing" ON IF BUILD_TESTS AND PYTHON2_EXECUTABLE AND DEFINED ENV{OPENCV_TEST_DATA_PATH}) -if(BUILD_TESTS AND ${the_module}_DOWNLOAD_CAFFE_MODELS) +OCV_OPTION(${the_module}_DOWNLOAD_CAFFE_MODELS "Use GoogLeNet Caffe model for testing" OFF IF BUILD_TESTS AND PYTHON2_EXECUTABLE AND DEFINED ENV{OPENCV_TEST_DATA_PATH}) +if(BUILD_TESTS AND PYTHON2_EXECUTABLE AND DEFINED ENV{OPENCV_TEST_DATA_PATH} + AND (DOWNLOAD_EXTERNAL_TEST_DATA OR ${the_module}_DOWNLOAD_CAFFE_MODELS)) add_custom_command( TARGET opencv_test_${name} POST_BUILD COMMAND ${PYTHON2_EXECUTABLE} download_model.py test_models.json WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts ) diff --git a/modules/xobjdetect/tools/waldboost_detector/CMakeLists.txt b/modules/xobjdetect/tools/waldboost_detector/CMakeLists.txt index 5f34f1e71..7d2272a9a 100644 --- a/modules/xobjdetect/tools/waldboost_detector/CMakeLists.txt +++ b/modules/xobjdetect/tools/waldboost_detector/CMakeLists.txt @@ -1,7 +1,7 @@ set(name waldboost_detector) set(the_target opencv_${name}) -set(OPENCV_${the_target}_DEPS opencv_core opencv_imgcodecs opencv_videoio +set(OPENCV_${the_target}_DEPS opencv_core opencv_imgproc opencv_imgcodecs opencv_videoio opencv_highgui opencv_xobjdetect) ocv_check_dependencies(${OPENCV_${the_target}_DEPS})