<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Thank you! I did not know about $ORIGIN but that is indeed exactly what I need.<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Alexander Neundorf <a.neundorf-work@gmx.net><br><b><span style="font-weight: bold;">To:</span></b> cmake@cmake.org<br><b><span style="font-weight: bold;">Cc:</span></b> Daryl N <darylhouse2004@yahoo.com><br><b><span style="font-weight: bold;">Sent:</span></b> Tue, February 15, 2011 3:45:25 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [CMake] Setting target destination and rpath per generator<br></font><br>
On Tuesday 15 February 2011, Daryl N wrote:<br>> Hi,<br>><br>> I have a question on the use of CPack. I have CMake setup to generate<br>> binaries and shared libraries. Up until now I have only created a TGZ with<br>> rpath set to ".". This has worked nicely, but now I would like to create a<br>> Debian package for proper installation. I have added DEB to<br>> CPACK_GENERATOR and I've created my own cpack_config.cmake file. My goal<br>> is:<br>><br>> 1. Run cmake/make package once and create the tar.gz file with all exe/libs<br>> in the root folder of the tar.gz file with rpath set to ".".<br>> 2. Create new .deb package with exes in /usr/local/bin and libs in<br>> /usr/local/lib. Alternatively, since files are private, all could be put<br>> in /usr/local/<some folder>.<br>><br>> I've attempted this by creating my own cpack_config.cmake file to try to<br>>
override some settings per generator. Some observations:<br>><br>> 1. I've been unable to set the install(<target> DESTINATION) path per<br>> generator in my cpack_config.cmake file. Whatever the variable is set to<br>> when the install(...) is processed in the CMakeLists.txt file is what is<br>> used for all generators. Just want to confirm changing this isn't an<br>> option per generator.<br>><br>> The above has prevented me from having my install lines like:<br>> install(<target> DESTINATION ${BIN_PATH})<br>> install(<target> DESTINATION ${LIB_PATH})<br>> and then setting BIN_PATH to bin and LIB_PATH to lib for DEB, but setting<br>> them to "." for TGZ, since I can't change the variable in<br>> cpack_config.cmake.<br><br>Are you sure "." does what you want ? I can remember I tried it to, and didn't <br>what I needed, but I can't remember the
details.<br><br>Do you know about $ORIGIN for the RPATH ? This means the location of the <br>containing ELF file.<br><br>Alex<br></div></div>
</div><br>
</body></html>