summaryrefslogtreecommitdiffstats
path: root/src/cmake/plugin.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmake/plugin.cmake')
-rw-r--r--src/cmake/plugin.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cmake/plugin.cmake b/src/cmake/plugin.cmake
index 4087325b0d6..a5b4bf51a16 100644
--- a/src/cmake/plugin.cmake
+++ b/src/cmake/plugin.cmake
@@ -20,9 +20,11 @@ macro(add_vpp_plugin name)
)
set(plugin_name ${name}_plugin)
set(api_headers)
+ file(RELATIVE_PATH rpath ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
foreach(f ${PLUGIN_API_FILES})
- vpp_generate_api_header(${f} plugins)
- list(APPEND api_headers ${f}.h ${f}.json)
+ vpp_generate_api_header(${f} plugins)
+ list(APPEND api_headers ${f}.h ${f}.json)
+ set_property(GLOBAL APPEND PROPERTY VPP_API_FILES ${rpath}/${f})
endforeach()
add_library(${plugin_name} SHARED ${PLUGIN_SOURCES} ${api_headers})
add_dependencies(${plugin_name} vpp_version_h api_headers)