[CMake] Building a DLL and test driver EXE using CMake -- error by design?
Chris Volpe ARA/SED
cvolpe at ara.com
Wed Mar 23 10:21:32 EDT 2011
> You might break this transitivity by explicitly setting
> the LINK_INTERFACE_LIBRARIES target properties of FeatureViewer to ""
That did it!!!! Thanks, Michael. That's exactly what I needed.
It's somewhat moot now, but your second suggestion confused me, and I'd like to understand better:
> As an alternative, you might use a second invocation
>
> TARGET_LINK_LIBRARIES(FeatureViewer TARGET_LINK_LIBRARIES ...)
Two questions:
1. Does a second invocation override the first invocation?
2. If I remove the VTK libs from this command, wouldn't that leave FeatureViewer with unresolved symbols?
Thanks again for your help!!
-Chris
> -----Original Message-----
> From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On
> Behalf Of Michael Hertling
> Sent: Tuesday, March 22, 2011 7:30 PM
> To: cmake at cmake.org
> Subject: Re: [CMake] Building a DLL and test driver EXE using CMake --
> error by design?
>
> [my original elided for brevity --CRV]
>
> The TARGET_LINK_LIBRARIES() command works transitively, i.e. TestDriver
> will be linked against each shared library that FeatureViewer is linked
> against, too. You might break this transitivity by explicitly setting
> the LINK_INTERFACE_LIBRARIES target properties of FeatureViewer to ""
> or, in general, to the set of libraries which are still to be linked
> transitively. As an alternative, you might use a second invocation
>
> TARGET_LINK_LIBRARIES(FeatureViewer TARGET_LINK_LIBRARIES ...)
>
> in FeatureViewer/CMakeLists.txt to explicitly specify the transitive
> libraries. Of course, the VTK ones should not appear in these lists.
>
> 'hope that helps.
>
> Regards,
>
> Michael
> _______________________________________________
> 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
More information about the CMake
mailing list