Commit 9a91a12f authored by Anatoly Baksheev's avatar Anatoly Baksheev

VIZ disabled by default, VTK search is performed iff BUILD_opencv_viz is enabled

parent 477ca067
......@@ -22,30 +22,31 @@ macro(find_vtk)
set(HAVE_VTK ON)
else ()
set(HAVE_VTK OFF)
message (WARNING "VTK disabled. You are to build OpenCV in STATIC but VTK is SHARED!")
message (FATAL_ERROR "VTK disabled. You are to build OpenCV in STATIC but VTK is SHARED!")
endif ()
endif()
endmacro()
find_vtk()
if (NOT OPENCV_INITIAL_PASS AND DEFINED BUILD_opencv_viz AND BUILD_opencv_viz)
find_vtk()
endif()
if(HAVE_VTK)
if(DEFINED HAVE_VTK AND HAVE_VTK)
set(VTK_USE_FILE ${VTK_USE_FILE} CACHE INTERNAL "VTK_USE_FILE")
include (${VTK_USE_FILE})
add_definitions(-DHAVE_VTK)
else()
return()
endif()
set(the_description "Viz")
set(BUILD_opencv_viz_INIT OFF)
include_directories(src)
ocv_define_module(viz opencv_core)
if(BUILD_opencv_viz)
if(DEFINED BUILD_opencv_viz AND BUILD_opencv_viz AND DEFINED HAVE_VTK AND HAVE_VTK)
target_link_libraries(opencv_viz vtkCommon vtkWidgets vtkFiltering vtkRendering)
if(APPLE)
target_link_libraries(opencv_viz "-framework Cocoa")
target_link_libraries(opencv_viz "-framework Cocoa")
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