ITK added to vcpkg

ITK has just been added to vcpkg. Caveats: the configuration is non-default, and a sample project relying on it wouldn’t build in debug mode. If you know how to improve that, don’t be shy!

vcpkg is Microsoft’s open source C/C++ package management system for Visual Studio 2015 and 2017.

Why don’t you give it a try and provide feedback?


An updated and improved port of ITK to vcpkg is ready for testing. In this update, both debug and release modes are working OK for a simple test application. All the default modules, and a few extra modules are built. Get it from this pull request.


That pull request has been merged! ITK 4.13.0 is now available through vcpkg. Caveat: you must not have hdf5 installed through vcpkg.

1 Like

Hey @dzenanz, thanks for the awesome work there! I am using the template in the vcpkg repo right now to generate builds for a recipe I need for my project but I am getting the following error:

Failed to get the hash for ${git_repo}

You can find more details on my issue:

I have created an updated PR to improve that but it has not been merged:

Hi @fbudin, thanks for that information. I don’t see any particular change to the remote module handling routine in your fork. Have you tried building some of them (for instance, ITKReview)? I am not sure why but any time I enable a remote module, I get the error described above.

I added -DITKReview=ON and -DModule_IsotropicWavelets=ON to the configuration file and it seems to work until a linking error late in the compilation:

lib/libITKIOPNG-4.13.a(itkPNGImageIO.cxx.o):itkPNGImageIO.cxx:function itkPNGWriteErrorFunction: error: undefined reference to 'png_set_longjmp_fn'
lib/libITKIOPNG-4.13.a(itkPNGImageIO.cxx.o):itkPNGImageIO.cxx:function itk::(anonymous namespace)::wrapSetjmp(png_struct_def*&) [clone .isra.10]: error: undefined reference to 'png_set_longjmp_fn'

But I don’t think the error is related to the new CMake flags. Also, it only fails in Release, not in Debug.

install-x64-windows-dbg-out.log (2.8 MB)

Hi @fbudin, thanks for the response. I tried using the exact recipe as the port (the only distinction is that I need DCMTK, for which I have a vcpkg recipe) and I am getting an error with ITKIOHDF5 (see line 7207 of the attached build report from vcpkg).