diff options
author | Damjan Marion <damarion@cisco.com> | 2018-08-26 18:14:46 +0200 |
---|---|---|
committer | Marco Varlese <marco.varlese@suse.de> | 2018-08-27 12:25:48 +0000 |
commit | 4c64b6edc86f7732f4a160b948b3386e4021a265 (patch) | |
tree | 296a8425f5b5274cf772fa3e62c4c145096a481e /src/cmake/api.cmake | |
parent | 3ce5f914ed6bd78f4b72bb5dfd4be480084094d1 (diff) |
cmake: add vapi build
Change-Id: Id939a0cbe35601478ad262f49bb0a1abdb62aa45
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/cmake/api.cmake')
-rw-r--r-- | src/cmake/api.cmake | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cmake/api.cmake b/src/cmake/api.cmake index 644e80b8270..533448ad16e 100644 --- a/src/cmake/api.cmake +++ b/src/cmake/api.cmake @@ -50,11 +50,14 @@ function(vpp_generate_api_header file dir) vpp_generate_api_json_header (${file} ${dir}) endfunction() -function(vpp_add_api_files target) +function(vpp_add_api_files name) unset(header_files) + set(target ${name}_api_headers) + file(RELATIVE_PATH rpath ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) foreach(file ${ARGN}) vpp_generate_api_header (${file} core) - list (APPEND header_files ${file}.h ${file}.json) + list(APPEND header_files ${file}.h ${file}.json) + set_property(GLOBAL APPEND PROPERTY VPP_API_FILES ${rpath}/${file}) endforeach() add_custom_target(${target} DEPENDS ${header_files}) endfunction() |