Hi Eric,
On Sun, Jan 8, 2012 at 5:20 PM, Eric Noulard <[email protected]> wrote:
> I'm not sure how you compile your example.
> Should they be built in-source?
> Do you create out-of-source build tree for each A,B,SomeProject?
I usually build out-of-source. What is built out-of-source is up to
the user. Typically, we build A once and leave it untouched and then
work on an isolated out-of-source build of B. SomeProject is usually
used only when everything is bundled into a single installer.
> However from your last message it seems like you
>
> export(TARGETS B A ...
>
> statements depends on the fact that A (resp B.) is an imported target or not.
Exactly.
> So may be you could add
>
> get_target_property(IA IMPORTED A)
>
> if (NOT IA)
> set(EXPORTEDA "A")
> else()
> set(EXPORTEDA "")
> endif()
>
> export(TARGETS B ${EXPORTEDA} ...
>
> Would this work for you use case?
This is interesting; I did not know about the IMPORTED property. I
could integrate this query into my hand-crafted export macro and I am
quite sure that it would help.
Thanks,
Hauke
--
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