Closed opoplawski closed 8 years ago
Dear @opoplawski,
thank you for the Pull Request!
Will this not break the compatibility with the version 7.0 of VTK? Maybe it should be added as an extra "if" after the existing one? Like this:
if(NOT VTK_FOUND)
find_package(VTK 7.0 QUIET COMPONENTS vtkRenderingCore vtkImagingCore vtkFiltersCore vtkIOCore vtkIOLegacy vtkIOXML vtkIOMINC vtkCommonCore vtkViewsCore vtksys vtkDICOMParser vtkexpat vtkzlib NO_MODULE)
endif()
if(NOT VTK_FOUND)
find_package(VTK 7.1 REQUIRED COMPONENTS vtkRenderingCore vtkImagingCore vtkFiltersCore vtkIOCore vtkIOGeometry vtkIOLegacy vtkIOXML vtkIOMINC vtkCommonCore vtkViewsCore vtksys vtkDICOMParser vtkexpat vtkzlib NO_MODULE)
endif()
or even better:
find_package(VTK 6.1 QUIET COMPONENTS vtkRenderingCore vtkImagingCore vtkFiltersCore vtkIOCore vtkIOLegacy vtkIOXML vtkIOMINC vtkCommonCore vtkViewsCore vtkftgl vtksys vtkDICOMParser vtkexpat vtkzlib NO_MODULE)
find_package(VTK 7.0 QUIET COMPONENTS vtkRenderingCore vtkImagingCore vtkFiltersCore vtkIOCore vtkIOLegacy vtkIOXML vtkIOMINC vtkCommonCore vtkViewsCore vtksys vtkDICOMParser vtkexpat vtkzlib NO_MODULE)
if(NOT VTK_FOUND)
find_package(VTK 7.1 REQUIRED COMPONENTS vtkRenderingCore vtkImagingCore vtkFiltersCore vtkIOCore vtkIOGeometry vtkIOLegacy vtkIOXML vtkIOMINC vtkCommonCore vtkViewsCore vtksys vtkDICOMParser vtkexpat vtkzlib NO_MODULE)
endif()
@opoplawski ,
can you confirm that following piece of code works with different versions of VTK (6.0, 7.0, 7.1)? If yes, please, update your PR - we would like to credit your contribution.
find_package(VTK 6.1 QUIET COMPONENTS vtkRenderingCore vtkImagingCore vtkFiltersCore vtkIOCore vtkIOLegacy vtkIOXML vtkIOMINC vtkCommonCore vtkViewsCore vtkftgl vtksys vtkDICOMParser vtkexpat vtkzlib NO_MODULE)
find_package(VTK 7.0 QUIET COMPONENTS vtkRenderingCore vtkImagingCore vtkFiltersCore vtkIOCore vtkIOLegacy vtkIOXML vtkIOMINC vtkCommonCore vtkViewsCore vtksys vtkDICOMParser vtkexpat vtkzlib NO_MODULE)
if(NOT VTK_FOUND)
find_package(VTK 7.1 REQUIRED COMPONENTS vtkRenderingCore vtkImagingCore vtkFiltersCore vtkIOCore vtkIOGeometry vtkIOLegacy vtkIOXML vtkIOMINC vtkCommonCore vtkViewsCore vtksys vtkDICOMParser vtkexpat vtkzlib NO_MODULE)
endif()
Thank you.
It should not make a difference to 6.1 as I didn't change that line. I don't have 7.0 so can't really test with that - but all we are doing is explicitly linking to another library which we do depend on. It probably should be added to the 6.1 line just for correctness.
We have added 'vtkIOGeometry' to the 6.1 line and it seems to work. Please, update your PR. Does 'find_package(VTK 7.0' works for you? Don't you need 'find_package(VTK 7.1'
@opoplawski,
probably 7.1 is compatible with 7.0, so CMake makes no troubles. It looks like your PR can be merged. Thank you very much for the patch! Could you (like all our contributors), please, follow the steps outlined bellow so we can accept your PR and credit your contribution:
http://asl.org.il/copyright_assignment/
While it looks like a bureaucratic formality - it is the only mechanism we have to enforce AGPL and thus protect ASL (including your contributions) from being exploited. This needs to be done only once for the first pull request.
Thank you again and welcome to the ASL community!
Fixes issue #25