On Wednesday, May 02, 2012 12:27:32 pm David Cole wrote: > On Wed, May 2, 2012 at 2:02 PM, Alexander Neundorf <neund...@kde.org> wrote: > > On Wednesday 02 May 2012, David Cole wrote: > >> On Wed, May 2, 2012 at 1:18 PM, Alexander Neundorf <neund...@kde.org> wrote: > >> > On Wednesday 02 May 2012, Stephen Kelly wrote: > > ... > > > >> >> I also think the 'Foo' would be redundant. It should be this to avoid > >> >> mistakes: > >> >> > >> >> cmake_package(LIBRARIES ${THE_FOO_LIBRARIES}) > >> >> > >> >> CMake already knows the name of the package, right? > >> > > >> > Isn't this getting a bit too much of new concepts ? > >> > I mean, the semantics of target_use_package() with imported or > >> > in-project targets are quite clear. > >> > Isn't everything else not maybe only added complexity for little > >> > benefit ? > >> > > >> > Alex > >> > -- > >> > >> I agree with Alex here -- let's start simple and add from there. > >> target_use_package should make a target use a package. To me, that > >> means starting with the basics: > >> > >> - automatically add all the right include directories > >> - automatically add any required definitions > >> - automatically add any required compiler flags > >> - automatically link to the right libraries > >> - do so recursively for any additional packages that the package itself > >> uses > >> - avoid cycles when recursing > >> - detect incompatibilities and inconsistencies and warn about them > >> early if possible > > > > When you say "package" here, do you mean package as in find_package(), or > > do you mean (typically) an imported target ? > > > > Alex > > I mean package. If we mean target here, then the new command should be > named target_use_target.
I like the idea of a target_use_target() that can be used with both imported and non-imported targets. The include, defines, etc... can be properties on a target when when target_use_target() is used, it could extract those properties and apply them on the using target. In the long run, I'd prefer that over directory scoped variables to pass around the information. -- Clinton Stimpson Elemental Technologies, Inc Computational Simulation Software, LLC www.csimsoft.com -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers