> in your proj_a example, when target_link_librairies invoke Lib B directly
> which generated in another project b, how does proj_a recognize it



> I think the reason is proj_a, b, c are all the sub directories of
> project root, if no root layer, B can not be invoked in proj_a, right?
>

That's correct.  In the example I gave, while proj_a, proj_b, and proj_c
are all sub-directories of the root level, only the root level, proj_b and
proj_c CMakeLists.txt files contain a separate project(...) command, which
meas that proj_b and proj_c can be configured and used independently but
proj_a cannot and needs to be configured from the root level where the B
and C targets are, in addition to their own separate projects, both
contained in the root level project(...) where A can see them.

- Chuck
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to