[CMake] How to set the install directory for MacOSX/PackageMaker

wedekind wedekind at caesar.de
Tue Dec 5 03:42:51 EST 2006


Hello again,

is anyone of you building packages with CPack for MacOSX? Do you think it is
a problem that you cannot change the installation-root of a PackageMaker
package?

I've looked at CPack's source code which sets the installation root-dir of
PackageMaker installers to "/usr" by default. It is hardcoded in
cmCPackPackageMakerGenerator::GetInstallPrefix().

I must admit that I am quite new to the Mac, but from what I've read it is
not the only option to install everything to "/usr" it is not even the
common or default case. There is at least the "Applications"-directory
(which seems to be the default location for an application-installation) and
the possibility to install an application to a user's home-dir.

So what is the reason behind choosing /usr to be the only installation
root-dir in CPack? Is there a way to change the installation root-dir for
PackageMaker installers with CPack or CMake?

I've had a look at a description of the PackageMaker application. There is a
GUI-application that assists you in creating PackageMaker installers. This
includes a setting called "Relocatable". If you check this the installer
lets the user choose the installation-dir. Unfortunately I did not find a
way to set this option via the command-line version of PackageMaker. Does
anyone know, how to set this "Relocatable"-flag on the command line?

Cheers

Marco




More information about the CMake mailing list