CMake uninstall targets and versioning
Posted: Mon Apr 01, 2013 10:06 pm
Uninstall targets in CMake would be useful. I'm developing on Linux. During debugging of a development branch, it's useful to install to system directories, then test whether things work when installed, so that I'm not relying on any build directory specific path weirdness. Doing this multiple times, it's useful to get rid of any stale install components that accumulate. This may become more of an issue now that David Rogers (MasterFalcon) has generously added a shared library versioning scheme to allow multiple simultaneous Ogre installations.
Example: when testing the GL3PLUS renderer, I almost tripped myself over a stale SampleBrowser_d in my /usr/local/bin. I recently erased my hg repository, did a clean clone of it, then fumbled with default vs. v1-9 branch for a bit. Got it built, probably forgot to configure the Debug option, so I installed SampleBrowser etc. instead of *_d files. I was in the habit of typing SampleBrowser_d for the past few weeks. ldd showed it was linked against libOgreMain_d.so.2.1.0, whereas my newly built SampleBrowser was linked against libOgreMain.so.1.9.0.
I suppose that means an uninstall should be smart about not clobbering Ogre versions it doesn't own. Er, maybe this implies that installed apps would benefit from versioning as well. It is unfortunate that they all use the same /usr/local/bin installation target by default. I suppose on Linux a ldd and a regex could be used to extract the version info, don't know about Windows or Mac. Trying to figure out how to head off DLL Hell at the pass.
Example: when testing the GL3PLUS renderer, I almost tripped myself over a stale SampleBrowser_d in my /usr/local/bin. I recently erased my hg repository, did a clean clone of it, then fumbled with default vs. v1-9 branch for a bit. Got it built, probably forgot to configure the Debug option, so I installed SampleBrowser etc. instead of *_d files. I was in the habit of typing SampleBrowser_d for the past few weeks. ldd showed it was linked against libOgreMain_d.so.2.1.0, whereas my newly built SampleBrowser was linked against libOgreMain.so.1.9.0.
I suppose that means an uninstall should be smart about not clobbering Ogre versions it doesn't own. Er, maybe this implies that installed apps would benefit from versioning as well. It is unfortunate that they all use the same /usr/local/bin installation target by default. I suppose on Linux a ldd and a regex could be used to extract the version info, don't know about Windows or Mac. Trying to figure out how to head off DLL Hell at the pass.