Building external dependency with CMake

184 views Asked by At

I'm trying to compile a C++ project which depends on a 3rd party library, called Foo for example. I'm using the ExternalProject_Add() command in a CMakeLists.txt file for this purpose. However, this library has a dependency, called Bar for example, which must be built first. The source files of the Bar library are located in a subdirectory of the source directory of the Foo library. So, here's my question: how can I compile the Bar library and then, the Foo library with the ExternalProject_Add() command? Thank you very much for your help.

Update: I forgot to say that the Foo and Bar libraries are both CMake projects which require a configure step before the build step.

0

There are 0 answers