Skip to content

Commit c630927

Browse files
committed
Samples: fixed viz tutorials building with enabled opencv_world
1 parent 2d1350a commit c630927

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

samples/cpp/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ endif()
3333
if(NOT HAVE_opencv_cudaarithm OR NOT HAVE_opencv_cudafilters)
3434
ocv_list_filterout(cpp_samples "/gpu/")
3535
endif()
36-
if(NOT TARGET opencv_viz)
36+
if(NOT VTK_USE_FILE)
3737
ocv_list_filterout(cpp_samples "/viz/")
3838
endif()
3939
if(NOT HAVE_IPP_A)
4040
ocv_list_filterout(cpp_samples "/ippasync/")
4141
endif()
4242
ocv_list_filterout(cpp_samples "real_time_pose_estimation/")
4343
foreach(sample_filename ${cpp_samples})
44-
if(sample_filename MATCHES "viz/" AND VTK_USE_FILE)
44+
if(sample_filename MATCHES "/viz/")
4545
include(${VTK_USE_FILE})
4646
endif()
4747
set(package "cpp")
@@ -50,10 +50,10 @@ foreach(sample_filename ${cpp_samples})
5050
endif()
5151
ocv_define_sample(tgt ${sample_filename} ${package})
5252
ocv_target_link_libraries(${tgt} ${OPENCV_LINKER_LIBS} ${OPENCV_CPP_SAMPLES_REQUIRED_DEPS})
53-
if(sample_filename MATCHES "gpu/" AND HAVE_opencv_cudaarithm AND HAVE_opencv_cuda_filters)
53+
if(sample_filename MATCHES "/gpu/" AND HAVE_opencv_cudaarithm AND HAVE_opencv_cuda_filters)
5454
ocv_target_link_libraries(${tgt} opencv_cudaarithm opencv_cudafilters)
5555
endif()
56-
if(sample_filename MATCHES "viz/" AND VTK_USE_FILE)
56+
if(sample_filename MATCHES "/viz/")
5757
ocv_target_link_libraries(${tgt} ${VTK_LIBRARIES})
5858
target_compile_definitions(${tgt} PRIVATE -DUSE_VTK)
5959
endif()

0 commit comments

Comments
 (0)