2017-11-29 21:52:42 +08:00
|
|
|
if(NOT HAVE_VTK)
|
2014-01-19 07:16:06 +08:00
|
|
|
ocv_module_disable(viz)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(the_description "Viz")
|
2017-01-16 23:12:38 +08:00
|
|
|
include(${VTK_USE_FILE})
|
2017-06-30 22:57:12 +08:00
|
|
|
|
|
|
|
if(NOT BUILD_SHARED_LIBS)
|
|
|
|
# We observed conflict between builtin 3rdparty libraries and
|
|
|
|
# system-wide similar libraries (but with different versions) from VTK dependencies
|
|
|
|
set(_conflicts "")
|
|
|
|
foreach(dep ${VTK_LIBRARIES})
|
|
|
|
if(("${dep}" MATCHES "libz\\." AND BUILD_ZLIB)
|
|
|
|
OR ("${dep}" MATCHES "libjpeg\\." AND BUILD_JPEG)
|
|
|
|
OR ("${dep}" MATCHES "libpng\\." AND BUILD_PNG)
|
|
|
|
OR ("${dep}" MATCHES "libtiff\\." AND BUILD_TIFF)
|
|
|
|
)
|
|
|
|
list(APPEND _conflicts "${dep}")
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
if(_conflicts)
|
2018-06-03 07:21:08 +08:00
|
|
|
message(STATUS "Disabling VIZ module due to conflicts with VTK dependencies: ${_conflicts}")
|
2017-06-30 22:57:12 +08:00
|
|
|
ocv_module_disable(viz)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2018-03-15 21:04:21 +08:00
|
|
|
ocv_warnings_disable(CMAKE_CXX_FLAGS -Winconsistent-missing-override -Wsuggest-override)
|
2017-08-20 00:05:32 +08:00
|
|
|
|
2017-01-27 22:51:19 +08:00
|
|
|
ocv_define_module(viz opencv_core WRAP python)
|
2019-12-13 22:52:40 +08:00
|
|
|
ocv_target_link_libraries(${the_module} PRIVATE ${VTK_LIBRARIES})
|
2014-01-19 07:16:06 +08:00
|
|
|
|
|
|
|
if(APPLE AND BUILD_opencv_viz)
|
2019-12-13 22:52:40 +08:00
|
|
|
ocv_target_link_libraries(${the_module} PRIVATE "-framework Cocoa")
|
2014-01-19 07:16:06 +08:00
|
|
|
endif()
|
2014-03-12 20:21:36 +08:00
|
|
|
|
|
|
|
if(TARGET opencv_test_viz)
|
|
|
|
set_target_properties(opencv_test_viz PROPERTIES MACOSX_BUNDLE TRUE)
|
|
|
|
endif()
|