[CMake] CPack: Add PATH to .profile
Eric Noulard
eric.noulard at gmail.com
Fri Sep 27 14:20:06 EDT 2013
2013/9/27 Michele Dolfi <dolfimeth at gmail.com>:
> Hi,
>
> Is it possible to create custom components in CPack to add
> CMAKE_INSTALL_PREFIX/bin to the user ~/.profile?
CMAKE_INSTALL_PREFIX is not used by CPack at least
not directly.
You may want to use:
CPACK_PACKAGING_INSTALL_PREFIX
or
CPACK_PACKAGE_INSTALL_DIRECTORY
> I would like to have an additional entry in the GUI created with
> PackageMaker that the user could select to patch the .profile.
I don't think you can do that out-of-the-box.
But I do not know the PackageMaker generator.
> Using install(SCRIPT ...) in CMake the patch my own .profile, not the one of
> the user installing my app.
Yes you want a "post-install" script.
With PackageMaker you have the
CPACK_PREFLIGHT_SCRIPT
CPACK_POSTFLIGHT_SCRIPT
which may be used to do that but I don't know how they works
and whether if they are "selectable" at install time.
--
Erk
L'élection n'est pas la démocratie -- http://www.le-message.org
More information about the CMake
mailing list