Build cmake child project from cmake parent projec

2019-09-18 07:20发布

问题:

I have cmake two projects, with project 2 added as a git submodule in project 1.

I would like to build project 2 from project 1.

How can I do this? I tried add_subdirectory, but this is just for adding source directories. I want to use the project 2 cmake files to build it.

Thanks!

回答1:

Use the ExternalProject module.



标签: cmake