Hi Will,

I found a way to make the RPM relocatable.

This brings some light into rpm relocation: 
http://www.rpm.org/max-rpm/ch-rpm-reloc.html

The Prefix: tag gives the part of the file names which is replaced when another 
prefix is specified. You can divert CPACK_RPM_SPEC_MORE_DEFINE from its 
intended use to add this tag to the spec file.

set( CPACK_RPM_SPEC_MORE_DEFINE "Prefix: /usr" )

The rpm now is relocatable. :-)

However, I did not yet find a way to set the default prefix from cmake, /usr 
seems to be hard coded. Would be nice if someone feels to add another setting 
to the generator letting the user set the default prefix and setting the 
Prefix: tag at the same time to allow relocation.

-Gerry

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to