2015-01-19 17:06 GMT+01:00  <[email protected]>:
> I am trying to build rpms for projects so they can be installed together
> using a modified yum into a user defined area as
> <new_prefix>/<project>/<platform>/<installed_binaries>
> hence the rpms should look like
> <relocatable>/<project>/<platform>/<installed_binaries>
>
> The only way I could find to do this was to
> set(CPACK_PACKAGING_INSTALL_PREFIX <relocatable>)
> set(CPACK_INSTALL_PREFIX <relocatable>/<project>/<platform>)
> and then call an install script which simply does
> SET(CPACK_SET_DESTDIR "")

Maybe I don't understand the problem but writing something like this:
install(TARGET some_target DESTINATION
"${INSTALL_PREFIX}/some_location") where install_prefix could be set
as "${CURRENT_PROJECT}/${CURRENT_PLATFORM}" (should be a relative
path)

and then write:
set(CPACK_PACKAGING_INSTALL_PREFIX "${RELOCATABLE}") where relocatable
can be "/"

should produce what you want.

If you really don't want to write "${INSTALL_PREFIX}" for each install
location then your solution would probably be the best way to go but
IMO setting install location is the cleaner solution.

Regards,
Domen
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to