Ok, let me share chosen approach then.<div><br></div><div>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.</div>
<div><br></div><div>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.<br>
<br></div><div>So thanks again for great software.</div><div><br><div class="gmail_quote">On Fri, Feb 18, 2011 at 2:17 PM, Yuri Timenkov <span dir="ltr"><<a href="mailto:yuri@timenkov.ru">yuri@timenkov.ru</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Dear all,<br><br>I haven't been using CMake (and hence following) for almost 3 years and I suppose it has a big progress since 2.4.<br>
<br>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.<br>
<br>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).<br><br>
So may be there are some guides, and discussions or examples about recent Find* modules behavior?<br><br>Thanks in advance,<br><font color="#888888">Yuri<br>
</font></blockquote></div><br></div>