[CMake] Using CPack on an PackageMaker Installer

Brigit Hawley brigit.hawley at gmail.com
Thu Jan 23 15:53:52 EST 2014


Hi,

I've been working with CPack for about two weeks now and am having a hard
time finding answers for some of my questions. I'm trying to use CMake to
generate an installer via PackageMaker on OS X. So far, I've got it
creating a valid installer that installs the app in the specified path.
What I'm concerned about is that the installed application doesn't seem to
be relocatable – every time I try to move the application after install, OS
X will either create a shortcut to the current application or create a
duplicate. Is there a way to specify an installation path, but also allow
for it to be relocatable?

After reading this article, I made sure to use the
CPACK_PACKAGING_INSTALL_PREFIX instead of the DESTDIR setting:

https://github.com/mgalloy/cpack-cheatsheets/blob/master/cpack-variables.rst


And I also have the flag CPACK_PACKAGE_RELOCATABLE set to true. Can anyone
tell me the right way to allow for a relocatable app?

If this is indeed possible, my next question is in the following scenario:

Let's say you have an application already installed on a computer. And
you're given a new installer that has some updates to the old application.
The only catch is that the application is installed in a different location
than what is specified in the current installer's installation path. Is
there a flag to set in CMake that tells the resulted installer to look for
any previous installs and to install in the found location(s)?

Cheers,

Brigit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140123/ea0775fd/attachment.html>


More information about the CMake mailing list