[CMake] Re: Patch to apply! Changing the default name"CMakeLists.txt"! Introduction to "Common Build System"

Pau Garcia i Quiles pgquiles at elpauer.org
Wed Jan 16 03:20:11 EST 2008


Quoting Alexander Neundorf <a.neundorf-work at gmx.net>:

> On Tuesday 15 January 2008, Brad King wrote:
>> Rodolfo Schulz de Lima wrote:
>> > Bill Hoffman wrote:
>> >> Something like this:
>> >>
>> >> find_package(bar REQUIRED)
>> >> add_executable(foo foo.cxx)
>> >> target_link_libraries(foo bar)
>> >
>> > This would be GREAT! What is the status on this one? Is it ready waiting
>> > for testing or you are still developing it? I could use this right now.
>> > Thank you very much for this feature...
>>
>> It's still under development.  I'm working on major improvements to
>> find_package right now.  Next I need to do some link computation work to
>> support "imported" library targets which will make the above possible.
>> I'm hoping to get these two steps done for the 2.6 release.
>
> I'm still think it might be a good idea to add a new command additionally to
> target_link_libraries() for that, like e.g.
> target_use_package(foo bar)
>
> because in the example above the same syntax is used as with current  
>  cmake but
> much more happens. A new command name for that would make it easier for
> somebody who knows cmake to see that here something different is going on.

I'm sorry but I think I have not understood what target_use_package is  
useful for. Say my system has a /usr/lib/libbar.so. It just works for  
me if I do target_link_library(foo bar). What am I missing?

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)



More information about the CMake mailing list