On Thu, Feb 16, 2012 at 3:52 PM, Eric Noulard <[email protected]>wrote:
> 2012/2/16 Brad King <[email protected]>: > > On 2/16/2012 3:29 PM, Eric Noulard wrote: > >> > >> What are you targeting? > >> > >> install-time i.e. "make install" usage? > >> package install time prodduced with cpack usage? > >> package install time NOT produced with cpack usage? > >> a subset of this? > > > > > > The goal is a FooConfig.cmake file for "make install" time but > > that contains no hard-coded paths referring to the install prefix. > > It should be totally relocatable. I think we've resolved all > > that in the other parts of this thread. > > I'm not convinced, yet I'll have to try with the example provided by Alex > by adding proper CPack usage in it. > > Currently I see in BarConfig.cmake > get_filename_component(BAR_HELPER_PREFIX_DIR > "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE) > > computed by CONFIGURE_CONFIG_FILE with > if(NOT IS_ABSOLUTE "${CCF_INSTALL_DESTINATION}") > set(absInstallDir "${CMAKE_INSTALL_PREFIX}/${CCF_INSTALL_DESTINATION}") > endif() > file(RELATIVE_PATH CONFIG_RELATIVE_PATH "${absInstallDir}" > "${CMAKE_INSTALL_PREFIX}" ) > where you can see the usage of "CMAKE_INSTALL_PREFIX". > > since CPack is using DESTDIR in order to do its local install before > actual packaging > I cannot see how this could work with CPack but again I may be simply > missing the point > I'll try to follow the thread tomorrow and try by myself. > > > -- > Erk > Membre de l'April - « promouvoir et défendre le logiciel libre » - > http://www.april.org > -- > > 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers > It can't work with CPack, not in the sense of "work" as in "the software will run from its DESTDIR-based intermediate CPack driven install location" However, it is a correct config file that will work when an end user installs it from an rpm or a deb package. (Or an NSIS installer on Windows...) In fact, it will work regardless of where they install it. Remember, these config files should not actually be processed by anything when they are in that DESTDIR CPack install tree, though. David
-- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
