On Tue, Oct 4, 2011 at 7:20 AM, Daniel Dekkers <[email protected]>wrote:
> Hi, > > Would really appreciate your advice on this. > > We are planning to use and maybe distribute a library (let's call it > OurLib) that depends on third-party libraries, namely Boost, Glut, OpenGL, > FreeType, Bullet, PNG, ... > You could take a look at what BRL-CAD does for this situation: http://brlcad.svn.sourceforge.net/viewvc/brlcad/brlcad/trunk (look for adding the src/other subdirectory in CMakeLists.txt) http://brlcad.svn.sourceforge.net/viewvc/brlcad/brlcad/trunk/src/other/ macros used are defined in: http://brlcad.svn.sourceforge.net/viewvc/brlcad/brlcad/trunk/misc/CMake/ >From a high level, our approach is to try to detect suitable installations of libraries on the system. If we find them, use them. If not, build our local copy. Currently our approach requires that each third-party library also have a functional CMake build, but in principle you could try adding support for other systems with ExternalProject_Add as well. We found it simpler to just write CMake logic where needed, since in theory we need all of our third-party deps to build in every situation BRL-CAD itself needs to build in - rather than worry about whether the third-party library has enough build systems defined to cover all those cases (and figuring out how to trigger which one when) it proved simpler to write the CMake logic for the library. Eventually, we'd like to have upstream adopt the CMake logic and we could just use their source archives unaltered, but we're a ways away from that and some projects are pretty heavily invested in Autotools. Cheers, CY
-- 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
