Ok, let me share chosen approach then. I decided to use package config and it seems to rock :). That is with only couple of lines I can easily describe what to link with. The main challenge is that we work with C++ libraries, and they are configuration- and compiler-dependent. Look at the boost nightmare for example. And since I know in advance location and names of all libraries (in my corporate environment) it is just a matter of few calls to set_target_properties depending on compiler version, rather than writing monstrous find modules which usually have a lot of copypasted stuff.
Also it seems that these configs should be very useful when dealing with intra-company dependencies. Say if we share a library with other department now we usually put it into both source trees using svn:externals (otherwise it will be difficult to set up source tree dependencies). But svn:externals have many pitfalls with branching or synchronizing changes when someone is in release phase. I know that this may be externals misuse, but when "convenient" crosses "right" the former usually wins. But with export(PACKAGE) dealing with such dependencies may be much easier. So thanks again for great software. On Fri, Feb 18, 2011 at 2:17 PM, Yuri Timenkov <y...@timenkov.ru> wrote: > Dear all, > > I haven't been using CMake (and hence following) for almost 3 years and I > suppose it has a big progress since 2.4. > > Now I'm looking for most kosher way to specify external dependencies for a > particular project. The most straightforward way of specifying include dirs > and libraries when porting from Visual Studio - is using include_directories > & link_directories commands. However, I heard that link_directories is not > very good idea and the preferred way is using imported targets. > > Some libraries are internal but built by separate teams for different > compilers version. Also we don't need to find library & include dir's > location, we know them in advance (and it is rather fixed). > > So may be there are some guides, and discussions or examples about recent > Find* modules behavior? > > Thanks in advance, > Yuri >
_______________________________________________ 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