<div dir="ltr">Hello all,<div><br></div><div>I have some issue when copying ITK install directory to a different system. I agree this is not usual and may not appear on a linux distro or windows.</div><div><br></div><div>My requirement is bit different. I cross-compile ITK and then use the binaries on Windows. Using dll and headers are fine. But the installed cmake files are a problem. They have absolute path in ITK-4.8/Modules/*.cmake files. It is not in all .cmake files even though I put a wildcard there..</div><div><br></div><div>For a easy and quick workaround. I rely on mighty sed command to insert something into installed cmake file.</div><div><br></div><div><div>For example see this;</div><div>lib/cmake/ITK-4.8/ITKTargets-release.cmake</div><div><br></div><div>set(CMAKE_IMPORT_FILE_VERSION 1)</div><div>set(LIB_INSTALL_PREFIX)</div><div>get_filename_component(CURRENT_FILE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)</div><div>get_filename_component(LIB_INSTALL_PREFIX "${CURRENT_FILE_DIR}" PATH)<br></div><div>get_filename_component(LIB_INSTALL_PREFIX "${LIB_INSTALL_PREFIX}" PATH)</div><div>get_filename_component(LIB_INSTALL_PREFIX "${LIB_INSTALL_PREFIX}" PATH)</div></div><div><br></div><div>and at last:</div><div><br></div><div><div>$(SED) -i 's,$(PREFIX)/$(TARGET),\${LIB_INSTALL_PREFIX},g' 'lib/cmake/ITK-$(ITK_VER)/ITKTargets-release.cmake'</div></div><div><br></div><div>I would like to have this patch inside the other .cmake files in the installation and avoid the sed commands during post-installation<br></div><div><br></div><div>Here is the list of cmake files that needs this change.</div><div>lib/cmake/ITK-4.8/ITKTargets-release.cmake<br></div><div><div><div>lib/cmake/ITK-4.8/Modules/ITKZLIB.cmake</div><div>lib/cmake/ITK-4.8/Modules/ITKExpat.cmake</div><div>lib/cmake/ITK-4.8/Modules/ITKHDF5.cmake</div><div>lib/cmake/ITK-4.8/Modules/ITKJPEG.cmake</div><div>lib/cmake/ITK-4.8/Modules/ITKTIFF.cmake</div><div>lib/cmake/ITK-4.8/Modules/ITKPNG.cmake</div></div><div><br></div><div>So is it possible to make the change into future version of ITK?</div><div><br></div><div>The major issue here is those cmake files are generated by cmake. Is there a way cmake could use relative path ?</div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div><font face="arial, helvetica, sans-serif">Regards,<br>   Rashad</font></div></div>
</div></div>