From 08bd44bce59d79c71e5b39db9e28cb34a65434ca Mon Sep 17 00:00:00 2001 From: Guillaume Solignac Date: Tue, 28 Sep 2021 15:01:26 +0200 Subject: 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 --- src/cmake/library.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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() -- cgit 1.2.3-korg