On Thursday 02 September 2010, Andreas Pakulat wrote: > Hi, > > I've got a small problem here, I'm building an installing a static > library which links (among other things) against QtCore. I'm also using > the cmake install(TARGETS .. EXPORT) stuff to export a Target.cmake file > with the library as imported target. Last but not least this lib has > some deps in its public API and hence I'm using LINK_INTERFACE_LIBRARIES > to add those. Unfortunately for some reason QtCore is also added which > I'd like to avoid (as it creates a dependency upon an absolute path to > Qt in the installed stuff). I've already tried setting the target > property to "", but its still added automatically by cmake. > > Anybody knows of something in cmake that would explain this?
This is a static lib ? IIRC for static libs the link interface is always full, since you always need the full list of libs (static libs are not actually linked). When your libfoo.a is created, this libfoo.a is not "linked" against QtCore, but still it references it. So QtCore has to be kept in the linker interface. Alex _______________________________________________ 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
