mirror of
https://github.com/opencv/opencv.git
synced 2025-06-08 18:13:13 +08:00
static build workaround
This commit is contained in:
parent
a84a5e8f1a
commit
c5a6846866
@ -4,6 +4,26 @@ endif()
|
|||||||
|
|
||||||
set(the_description "Viz")
|
set(the_description "Viz")
|
||||||
include(${VTK_USE_FILE})
|
include(${VTK_USE_FILE})
|
||||||
|
|
||||||
|
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)
|
||||||
|
message(STATUS "Disabling VIZ module due conflicts with VTK dependencies: ${_conflicts}")
|
||||||
|
ocv_module_disable(viz)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
ocv_define_module(viz opencv_core WRAP python)
|
ocv_define_module(viz opencv_core WRAP python)
|
||||||
ocv_target_link_libraries(${the_module} ${VTK_LIBRARIES})
|
ocv_target_link_libraries(${the_module} ${VTK_LIBRARIES})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user