I am porting an external project that use ITKWrap to wrap its own itk-based modules to ITK 5 and I’ve some issue with the location of Wrapping scripts. The initial script was:
My problem is that cmake cannot find the macro itk_wrap_module. It is somewhat logical as it is nowhere in my ITK install hierarchy (Build with ITK_WRAPPING=ON). I would expect this files to be installed in ${ITK_INSTALL_PREFIX}/lib/cmake/ITK-5.0/WrapITK or something like this.
Thanks for your answer… The issue I have is even once you get path to the wrapping directory in your project (let’s say WRAP_ITK_CMAKE_DIR = ${ITK_SRC_DIR}/Wrapping), it not quite enough. You need to include the main configuration file:
include (${WRAP_ITK_CMAKE_DIR}/ConfigureWrapping.cmake)
Then, this file add the generators subdirectory with CMake scripts that depends on macro in ITK source directory (${ITK_SRC_DIR}/cmake/itkTargetLinkLibrariesWithDynamicLookup.cmake). Thus, you need to point to this directory as well to be to include it.
All of this made me think I was missing something obvious… In ITK v5.0.0rc2 there was a WrapITKConfig.cmake.in that disappeared in ITK v5.0.0…