[CMake] INSTALL query (itk,cmake)

Atwood, Robert (DLSLtd,RAL,DIA) Robert.Atwood at diamond.ac.uk
Thu Sep 10 07:23:26 EDT 2009


Hi,

I think I found some information on my own, about this. 
 
http://cmake.org/Wiki/CMake_RPATH_handling
 
Which explains the behaviour I observed (but didn't expect) 
 
However, what is the recommended way for installing one's own itk-based
programs and the itk-libraries for others on the system to use? 
It seems I should either:
 
1 Have any itk users insert a LD_LIBRARY_PATH pointing to
...lib/InsightToolKit
 
2 Use full RPATH (vulnerable to assorted  filesystem layout change
problems ) 
 
3 install ITK libraries in /usr/local/... (but that's not good for the
cluster, /usr/local is not central but local to each node here) 
 
Any suggestions? 
 
I am veering towards option 1 combined with 'modules'
http://modules.sourceforge.net/ 
 
 

________________________________

From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf
Of Atwood, Robert (DLSLtd,RAL,DIA)
Sent: 08 September 2009 16:25
To: cmake at cmake.org
Subject: [CMake] INSTALL query (itk,cmake)


Hi,
I finally attempted to enable INSTALL support in my CMakeLists file for
a project that uses ITK.
 
However when I install by this method the program loses the location of
the ITK libraries.
 
__________________
 which itk_flop
/dls/i12/software/64/bin/itk_flop

 
 itk_flop
itk_flop: error while loading shared libraries: libITKCommon.so.3.15:
cannot open shared object file: No such file or directory
_____________________

 
 
 
Simply copying the built project files into the installation destination
does not lose the location. 
 
________________
cp itk_flop /dls/i12/software/64/bin/
 
 which itk_flop
/dls/i12/software/64/bin/itk_flop

 itk_flop
Little program to use itk reading and writing
to convert file formats
including reading a series of files and writing an orthogonal series
 
Series Usage: itk_flop inbasename.xxx first last outbasename.yyy
______________________
 
What should be done? I'd like other users to be able to issue  'make
install' and have it work for them.

 

I used these lines in my CMakeLists.txt file, as suggested by
http://www.itk.org/Wiki/CMake:Install_Commands
 
 
 
 
SET(CMAKE_INSTALL_PREFIX "/dls/i12/software/64" CACHE PATH "Local
installation
prefix" FORCE )

...
 
 INSTALL(TARGETS scanpar itk_flop itk_series_readwrite
itk_parallel_project itk_readwrite_series
    RUNTIME DESTINATION bin
    LIBRARY DESTINATION lib
    ARCHIVE DESTINATION lib)

 
 
In ccmake I've selected the followign, which is indeed the location of
InsightToolkit
 
 ITK_DIR
/dls/i12/software/64/lib/InsightToolkit

 
Thanks,
Robert
 
 
 


This e-mail and any attachments may contain confidential, copyright and
or privileged material, and are for the use of the intended addressee
only. If you are not the intended addressee or an authorised recipient
of the addressee please notify us of receipt by returning the e-mail and
do not use, copy, retain, distribute or disclose the information in or
attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual
and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any
attachments are free from viruses and we cannot accept liability for any
damage which you may sustain as a result of software viruses which may
be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in
England and Wales with its registered office at Diamond House, Harwell
Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United
Kingdom
 



This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.

Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 

Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.

Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090910/1ece480a/attachment-0001.htm>


More information about the CMake mailing list