build: add cmake dependency from test plugin to api 88/27588/2
authorTom Seidenberg <tseidenb@cisco.com>
Wed, 17 Jun 2020 21:31:44 +0000 (17:31 -0400)
committerDamjan Marion <dmarion@me.com>
Fri, 19 Jun 2020 07:04:08 +0000 (07:04 +0000)
Type: fix

Signed-off-by: Tom Seidenberg <tseidenb@cisco.com>
Change-Id: I00fa22733bd293e56eb6b81346fdf2d75ad9d88f

src/cmake/plugin.cmake

index bf40aa5..c37e349 100644 (file)
@@ -78,6 +78,9 @@ macro(add_vpp_plugin name)
     add_library(${test_plugin_name} SHARED ${PLUGIN_API_TEST_SOURCES}
                ${api_includes})
     set_target_properties(${test_plugin_name} PROPERTIES NO_SONAME 1)
+    if(PLUGIN_API_FILES)
+      add_dependencies(${test_plugin_name} ${plugin_name}_api_headers)
+    endif()
     if(NOT VPP_EXTERNAL_PROJECT)
       add_dependencies(${test_plugin_name} api_headers)
     endif()