From: Guillaume Solignac Date: Tue, 28 Sep 2021 13:01:26 +0000 (+0200) Subject: build: fix missing dependency for library X-Git-Tag: v22.10-rc0~335 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=08bd44bce59d79c71e5b39db9e28cb34a65434ca;p=vpp.git build: fix missing dependency for library When building a VPP library out of tree using add_vpp_library, the build sometimes fails because the library API files are not necessarily generated before compiling this library. This is fixed by adding the lib API files as dependencies of the lib compilation. Type: fix Signed-off-by: Guillaume Solignac Change-Id: I69dffaecbfd547f10115504494a47358c4624258 --- diff --git a/src/cmake/library.cmake b/src/cmake/library.cmake index fbb2c68f218..ad4adfcabc4 100644 --- a/src/cmake/library.cmake +++ b/src/cmake/library.cmake @@ -80,6 +80,10 @@ macro(add_vpp_library lib) add_dependencies(${lo} api_headers) endif() + if(VPP_EXTERNAL_PROJECT AND ARG_API_FILES) + add_dependencies(${lo} ${lib}_api_headers) + endif() + if(ARG_DEPENDS) add_dependencies(${lo} ${ARG_DEPENDS}) endif()