[CMake] Need help with relocatable PackageMaker options in CPack

Paolo Ciccone phciccone at gmail.com
Thu Aug 25 11:16:03 EDT 2011


Hello.

Let me first thank the authors of CMake for giving us such powerful
and flexible tool. I'm trying to deliver a plugin that I wrote to both
Mac OS and Windows. I thought of using CPack and it's a mixed bag of
success and failure. I could not find information in the CPack
documentation so here I am to ask your help :)

My plugin has to be installed into the directory tree of the host
application (DAZ Studio). This means to add files/directories into the
DAZStudio3/plugins and DAZStudio3/scripts directories. The user has
the ability to install DAZ Studio in any directory of her choice so I
need to give the ability to select which directory to use for the root
of my installation

Using NCIS everything is fine, my big problem is with the
configuration of PackageMaker. I used the

SET(CPACK_SET_DESTDIR "ON")
SET(CPACK_INSTALL_PREFIX "/Applications/DAZ 3D/DAZStudio3")

commands to make it relocatable and give a default location. The user
can select the root directory but anything else fail. I end up with a
"/Applications/DAZ 3D/DAZStudio3" subdirectory under whatever the user
selected as the root of the installation. So, for example, if the
install root is "/Applications/DAZ 3D/DAZStudio3_32bit" the plugin
gets installed into

/Applications/DAZ 3D/DAZStudio3_32bit/Applications/DAZ 3D/DAZStudio3/plugins

instead of

/Applications/DAZ 3D/DAZStudio3_32bit/plugins

Is there a solution to this?

Thanks in advance.

---
Paolo Ciccone
www.preta3d.com
www.paolociccone.com


More information about the CMake mailing list