straszheim/boost-python — pull request #2 by aolivas (2012-08-28 23:36:27+00:00)
Title: New make targets for easy swapping.

added 'install','uninstall', and 'check_install' targets. useful for switching back and forth.

The main downside is that it hacks your standard install, which I'm not very proud of. There might be a better cmake way of doing this, which leaves your install alone (my preference). What I would prefer is to easily point your project to just the new boost::python component, which looks like it involves keeping a local FindBoost.cmake and hacking in that feature...unless I'm missing some cmake magic that makes this easy.

Currently it 'hides' the python include dir, python.hpp, and libboost_python.so and can seamlessly uninstall. Another obvious downside is that the change is made system-wide, so *anything* that links to boost::python will build and link against the new install. I know...

I also decided to do most of this in python (check out the new install.py script) since cmake seems particularly clunky at handling these kinds of things. There's a built-in 'install' command that generates an install target and has a SCRIPT option, which I didn't find all that useful. There are comments in the CMakeLists.txt file.

Another feature I'd like to eventually get in is detecting the build configuration from the standard install. For example, it'd be nice to also build multi-threaded and debug libraries if they exist in the standard build. Shouldn't be too tough. Gonna put that on the back burner for now though.