[ITK] [ITK-dev] installed ITK cannot be moved due to absolute path
Rashad Kanavath
mohammedrashadkm at gmail.com
Mon May 9 16:27:37 EDT 2016
Hello all,
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.
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..
For a easy and quick workaround. I rely on mighty sed command to insert
something into installed cmake file.
For example see this;
lib/cmake/ITK-4.8/ITKTargets-release.cmake
set(CMAKE_IMPORT_FILE_VERSION 1)
set(LIB_INSTALL_PREFIX)
get_filename_component(CURRENT_FILE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(LIB_INSTALL_PREFIX "${CURRENT_FILE_DIR}" PATH)
get_filename_component(LIB_INSTALL_PREFIX "${LIB_INSTALL_PREFIX}" PATH)
get_filename_component(LIB_INSTALL_PREFIX "${LIB_INSTALL_PREFIX}" PATH)
and at last:
$(SED) -i 's,$(PREFIX)/$(TARGET),\${LIB_INSTALL_PREFIX},g'
'lib/cmake/ITK-$(ITK_VER)/ITKTargets-release.cmake'
I would like to have this patch inside the other .cmake files in the
installation and avoid the sed commands during post-installation
Here is the list of cmake files that needs this change.
lib/cmake/ITK-4.8/ITKTargets-release.cmake
lib/cmake/ITK-4.8/Modules/ITKZLIB.cmake
lib/cmake/ITK-4.8/Modules/ITKExpat.cmake
lib/cmake/ITK-4.8/Modules/ITKHDF5.cmake
lib/cmake/ITK-4.8/Modules/ITKJPEG.cmake
lib/cmake/ITK-4.8/Modules/ITKTIFF.cmake
lib/cmake/ITK-4.8/Modules/ITKPNG.cmake
So is it possible to make the change into future version of ITK?
The major issue here is those cmake files are generated by cmake. Is there
a way cmake could use relative path ?
--
Regards,
Rashad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160509/ab773227/attachment.html>
-------------- next part --------------
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-developers
More information about the Community
mailing list