[ITK] How to avoid NIFTI header files from being installed?

Matt McCormick matt.mccormick at kitware.com
Sun Sep 17 14:33:46 EDT 2017


Hi Niels,

On Fri, Sep 15, 2017 at 11:35 AM, Niels Dekker <niels-xtk at xs4all.nl> wrote:
> With ITK 4.12.2, ITKNIFTI has moved from the DEPENDS section to the
> PRIVATE_DEPENDS section of NIFTI IO module, and I think that's a good thing:
>
>
> https://github.com/Kitware/ITK/blob/v4.12.2/Modules/IO/NIFTI/itk-module.cmake
>
> https://github.com/Kitware/ITK/commit/940f68ec18b15e500cc22d8ddb1dbae34b66cb2f#diff-72c0401735029f07ee8f10df8269b871
>
> The internal interface between ITK and NIFTI should not be leaked to ITK
> user applications, so that's just fine.

Yes, this is excellent.


> However, when doing an INSTALL, nifti1.h and nifti1_io.h (as well as
> itk_nifti_mangle.h) are still copied to the user's install directory:
>
>  -- Installing: <my-install-dir>/include/ITK-4.12/itk_nifti_mangle.h
>  -- Installing: <my-install-dir>/include/ITK-4.12/nifti1.h
>  -- Installing: <my-install-dir>/include/ITK-4.12/nifti1_io.h
>
> Is this really necessary?  If not, how could this possibly be fixed?

To avoid this, a CMake option, ITK_USE_SYSTEM_NIFTI could be set up
similar to other third party modules. The CMake configuration code
needs to be added to the module so it can find the system NIFTI and
export the required build information to other modules.


Thanks,
Matt


More information about the Community mailing list