[CMake] CPack Mac OSX bundle uninstall

Werner Smekal smekal at iap.tuwien.ac.at
Wed May 5 10:22:20 EDT 2010


Hi,

On 5/5/10 4:00 PM, David Ojeda wrote:
> Hello cmakers!
>
> I am developing a C++ library and I am testing CMake with Cpack with the
> bundle generator for mac osx (BTW, great work! Very easy to use!). I
> have successfully generated a .dmg that has a .pkg. I managed to install
> the libraries and headers that are included with my library. However, I
> wanted to uninstall it and I can't find a suitable way to do this.
>
> Normally, I will distribute this (compiled) library and headers as a
> .dmg or .deb (for debian). The onyl way I found to uninstall under Mac,
> was adding an uninstall target to the CMakeLists.txt. Unfortunately, not
> all developers will have cmake so this option is not very attractive.
>
> How do you uninstall your files installed with the .dmg/.pkg generated
> by the mac osx bundle generator of CPack?
AFAIK, there is no standard way to uninstall programm/libraries
installed with the apple installer. E.g. Qt is distributed as pkg and
also installs a python script, which if run uninstalls all libraries and
headers again. This is what I regularly see (actually rarely, since most
of the time there is no uninstaller at all). I don't know of any other
reliable option.

Further see here:
http://www.macosxhints.com/article.php?story=20071214144159216
http://www.macosxhints.com/article.php?story=20100107090139622

If you read through the comments you'll see other solutions and many
warnings, so best IMO is to provide an uninstall script, which may be
automatically configured during the cmake stage.

Regards,
Werner
>
> Thank you for your help,
>
> 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://www.cmake.org/mailman/listinfo/cmake


-- 
Dr. Werner Smekal
Institut fuer Angewandte Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10/134
A-1040 Wien
Austria
DVR-Nr: 0005886

email: smekal at iap.tuwien.ac.at  (GPG: EDCAF4A79)
web:   http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office)
       +43-(0)1-58801-13469 (laboratory)
fax:   +43-(0)1-58801-13499


More information about the CMake mailing list