pololu / libusbp

The Pololu USB Library (also known as libusbp) is a cross-platform C library for accessing USB devices.
Other
104 stars 32 forks source link

[feature] Added cmake uninstall target #6

Closed Nightwalker-87 closed 3 years ago

Nightwalker-87 commented 3 years ago

This commit enables a clean uninstall of the libusbp library from the system by using a terminal command. The procedure is handled by cmake and make. A note on how to proceed has been added to README.md .

DavidEGrayson commented 3 years ago

Hello. Thank you for your interest in libusbp. I do not think libusbp needs to directly support an uninstall feature, especially if it requires adding so much code to the CMake files. I also suspect the code you are presenting here will not handle a lot of cases properly. If you need to uninstall libusbp on a regular basis, I suggest running a simple shell command that looks something like rm -rfv /usr/local/lib/libusbp-1* ... and lists all the places where libusbp installs a file. Another option is to use use the DESTDIR environment variable to install the library in a dedicated directory, and then just remove that directory. You could also manage the installation/uninstallation using your system's package manager.