From c63092781ad46e9d6c7ed9889c6c844d654611c2 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Mon, 12 Feb 2018 18:39:32 +0300 Subject: [PATCH] Samples: fixed viz tutorials building with enabled opencv_world --- samples/cpp/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/cpp/CMakeLists.txt b/samples/cpp/CMakeLists.txt index 18fc6f8db4..7de6c1c278 100644 --- a/samples/cpp/CMakeLists.txt +++ b/samples/cpp/CMakeLists.txt @@ -33,7 +33,7 @@ endif() if(NOT HAVE_opencv_cudaarithm OR NOT HAVE_opencv_cudafilters) ocv_list_filterout(cpp_samples "/gpu/") endif() -if(NOT TARGET opencv_viz) +if(NOT VTK_USE_FILE) ocv_list_filterout(cpp_samples "/viz/") endif() if(NOT HAVE_IPP_A) @@ -41,7 +41,7 @@ if(NOT HAVE_IPP_A) endif() ocv_list_filterout(cpp_samples "real_time_pose_estimation/") foreach(sample_filename ${cpp_samples}) - if(sample_filename MATCHES "viz/" AND VTK_USE_FILE) + if(sample_filename MATCHES "/viz/") include(${VTK_USE_FILE}) endif() set(package "cpp") @@ -50,10 +50,10 @@ foreach(sample_filename ${cpp_samples}) endif() ocv_define_sample(tgt ${sample_filename} ${package}) ocv_target_link_libraries(${tgt} ${OPENCV_LINKER_LIBS} ${OPENCV_CPP_SAMPLES_REQUIRED_DEPS}) - if(sample_filename MATCHES "gpu/" AND HAVE_opencv_cudaarithm AND HAVE_opencv_cuda_filters) + if(sample_filename MATCHES "/gpu/" AND HAVE_opencv_cudaarithm AND HAVE_opencv_cuda_filters) ocv_target_link_libraries(${tgt} opencv_cudaarithm opencv_cudafilters) endif() - if(sample_filename MATCHES "viz/" AND VTK_USE_FILE) + if(sample_filename MATCHES "/viz/") ocv_target_link_libraries(${tgt} ${VTK_LIBRARIES}) target_compile_definitions(${tgt} PRIVATE -DUSE_VTK) endif()