Commit c6309278 authored by Maksim Shabunin's avatar Maksim Shabunin

Samples: fixed viz tutorials building with enabled opencv_world

parent 2d1350a9
......@@ -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()
......
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