vtk_module_link couldn't resolve an IMPORTED library.
When trying to build VTK with OpenTURNS enabled, I got this:
CMake Error at CMake/vtkModule.cmake:1698 (target_link_libraries):
Target "FiltersOpenTURNS" links to:
TBB::tbb
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
Call Stack (most recent call first):
Filters/OpenTURNS/CMakeLists.txt:26 (vtk_module_link)
CMake Error at D:/M/msys64/clang64/lib/cmake/openturns/OpenTURNS-Targets.cmake:56 (set_target_properties):
The link interface of target "OT" contains:
TBB::tbb
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
Call Stack (most recent call first):
D:/M/msys64/clang64/lib/cmake/openturns/OpenTURNSConfig.cmake:92 (include)
Filters/OpenTURNS/CMakeLists.txt:1 (find_package)
OpenTURNSConfig.cmake:
...
set ( OPENTURNS_FOUND 1 )
set_and_check ( OPENTURNS_USE_FILE "${PACKAGE_PREFIX_DIR}/lib/cmake/openturns/UseOpenTURNS.cmake" )
set ( OPENTURNS_DEFINITIONS "" )
set_and_check ( OPENTURNS_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/include" )
set ( OPENTURNS_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include" )
set ( OPENTURNS_LIBRARY "OT" )
set ( OPENTURNS_LIBRARIES "TBB::tbb;OT" )
set ( OPENTURNS_LIBRARY_DIRS "${PACKAGE_PREFIX_DIR}/lib" )
set_and_check ( OPENTURNS_ROOT_DIR "${PACKAGE_PREFIX_DIR}" )
set ( OPENTURNS_VERSION_STRING "1.18" )
set ( OPENTURNS_VERSION_MAJOR "1" )
set ( OPENTURNS_VERSION_MINOR "18" )
set ( OPENTURNS_VERSION_PATCH "" )
set (OPENTURNS_SWIG_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include/openturns/swig")
set ( OPENTURNS_SWIG_DEFINITIONS "-DSWIG_TYPE_TABLE=pyproba" )
set (OPENTURNS_PYTHON3_MODULE_PATH "${PACKAGE_PREFIX_DIR}/lib/python3.9/site-packages")
...
intel-tbb is installed and VTK_SMP_IMPLEMENTATION_TYPE=TBB
, It succeeded without enabling OpenTURNS.
I think this is a issue from VTK part.