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() ...@@ -33,7 +33,7 @@ endif()
if(NOT HAVE_opencv_cudaarithm OR NOT HAVE_opencv_cudafilters) if(NOT HAVE_opencv_cudaarithm OR NOT HAVE_opencv_cudafilters)
ocv_list_filterout(cpp_samples "/gpu/") ocv_list_filterout(cpp_samples "/gpu/")
endif() endif()
if(NOT TARGET opencv_viz) if(NOT VTK_USE_FILE)
ocv_list_filterout(cpp_samples "/viz/") ocv_list_filterout(cpp_samples "/viz/")
endif() endif()
if(NOT HAVE_IPP_A) if(NOT HAVE_IPP_A)
...@@ -41,7 +41,7 @@ if(NOT HAVE_IPP_A) ...@@ -41,7 +41,7 @@ if(NOT HAVE_IPP_A)
endif() endif()
ocv_list_filterout(cpp_samples "real_time_pose_estimation/") ocv_list_filterout(cpp_samples "real_time_pose_estimation/")
foreach(sample_filename ${cpp_samples}) foreach(sample_filename ${cpp_samples})
if(sample_filename MATCHES "viz/" AND VTK_USE_FILE) if(sample_filename MATCHES "/viz/")
include(${VTK_USE_FILE}) include(${VTK_USE_FILE})
endif() endif()
set(package "cpp") set(package "cpp")
...@@ -50,10 +50,10 @@ foreach(sample_filename ${cpp_samples}) ...@@ -50,10 +50,10 @@ foreach(sample_filename ${cpp_samples})
endif() endif()
ocv_define_sample(tgt ${sample_filename} ${package}) ocv_define_sample(tgt ${sample_filename} ${package})
ocv_target_link_libraries(${tgt} ${OPENCV_LINKER_LIBS} ${OPENCV_CPP_SAMPLES_REQUIRED_DEPS}) 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) ocv_target_link_libraries(${tgt} opencv_cudaarithm opencv_cudafilters)
endif() endif()
if(sample_filename MATCHES "viz/" AND VTK_USE_FILE) if(sample_filename MATCHES "/viz/")
ocv_target_link_libraries(${tgt} ${VTK_LIBRARIES}) ocv_target_link_libraries(${tgt} ${VTK_LIBRARIES})
target_compile_definitions(${tgt} PRIVATE -DUSE_VTK) target_compile_definitions(${tgt} PRIVATE -DUSE_VTK)
endif() 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