Use target OpenMP::OpenMP_CXX for exported targets

Using `${OpenMP_CXX_LIBRARIES}` results in paths to certain libraries
being hard-coded in VTKmTargets.cmake, which can lead to issues in some
cases (e.g.: when VTK is built by the CI system for MSYS2).
This commit is contained in:
Yohann Vautrin 2024-04-23 15:51:17 -04:00
parent 6e8308f2bb
commit ba75296f65

@ -71,7 +71,7 @@ if(VTKm_ENABLE_OPENMP AND NOT (TARGET vtkm_openmp OR TARGET vtkm::openmp))
endif() endif()
if(OpenMP_CXX_LIBRARIES) if(OpenMP_CXX_LIBRARIES)
set_target_properties(vtkm_openmp PROPERTIES set_target_properties(vtkm_openmp PROPERTIES
INTERFACE_LINK_LIBRARIES "${OpenMP_CXX_LIBRARIES}") INTERFACE_LINK_LIBRARIES OpenMP::OpenMP_CXX)
endif() endif()
install(TARGETS vtkm_openmp EXPORT ${VTKm_EXPORT_NAME}) install(TARGETS vtkm_openmp EXPORT ${VTKm_EXPORT_NAME})
endif() endif()