[CMake] Global property for LINK_INTERFACE_LIBRARIES (was Re: set_property(TARGET bla PROPERTY LINK_INTERFACE_LIBRARIES ""))

Tyler Roscoe tyler at cryptio.net
Fri Oct 23 11:05:33 EDT 2009


On Fri, Oct 23, 2009 at 03:36:10PM +0200, Mathieu Malaterre wrote:
> for all my shared lib. I'd like avoiding repeating
> 
> add_library(bla SHARED ${bla_SRCS})
> target_link_libraries(bla foo) # foo is shared
> set_property(TARGET bla PROPERTY LINK_INTERFACE_LIBRARIES "") # cumbersome

Like any kind of software development, when you find that you are
repeating yourself, it's time to write a function/macro.

I don't know of a way to do what you want automatically.

tyler


More information about the CMake mailing list