diff options
author | Damjan Marion <damarion@cisco.com> | 2018-08-29 22:20:45 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-08-30 12:35:28 +0000 |
commit | 43b06063015abfa42bc9c5ab925cd6b7ea3cbf42 (patch) | |
tree | f7e1acfeae68735929ebaccf5fe1eb1b8f86ee0e /src/cmake/library.cmake | |
parent | ec2a9bbb89a4ec1ebf8982f1d611179cd84315b8 (diff) |
cmake: a bit of packaging work
Change-Id: I40332c2348c4aab873d726532f2ac3c4abde7ec9
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/cmake/library.cmake')
-rw-r--r-- | src/cmake/library.cmake | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/cmake/library.cmake b/src/cmake/library.cmake index 66b4dffe575..0d1e97cb6a3 100644 --- a/src/cmake/library.cmake +++ b/src/cmake/library.cmake @@ -14,7 +14,7 @@ macro(add_vpp_library lib) cmake_parse_arguments(ARG "" - "" + "COMPONENT" "SOURCES;MULTIARCH_SOURCES;API_FILES;LINK_LIBRARIES;INSTALL_HEADERS;DEPENDS" ${ARGN} ) @@ -27,7 +27,14 @@ macro(add_vpp_library lib) target_link_libraries(${lib} ${ARG_LINK_LIBRARIES}) endif() # install .so - install(TARGETS ${lib} DESTINATION ${VPP_LIB_DIR_NAME}) + if(NOT ARG_COMPONENT) + set(ARG_COMPONENT vpp) + endif() + install( + TARGETS ${lib} + DESTINATION ${VPP_LIB_DIR_NAME} + COMPONENT ${ARG_COMPONENT} + ) if(ARG_MULTIARCH_SOURCES) vpp_library_set_multiarch_sources(${lib} ${ARG_MULTIARCH_SOURCES}) @@ -37,7 +44,11 @@ macro(add_vpp_library lib) vpp_add_api_files(${lib} ${ARG_API_FILES}) foreach(file ${ARG_API_FILES}) get_filename_component(dir ${file} DIRECTORY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${file}.h DESTINATION include/${lib}/${dir}) + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/${file}.h + DESTINATION include/${lib}/${dir} + COMPONENT vpp-dev + ) endforeach() endif() @@ -49,7 +60,11 @@ macro(add_vpp_library lib) if(ARG_INSTALL_HEADERS) foreach(file ${ARG_INSTALL_HEADERS}) get_filename_component(dir ${file} DIRECTORY) - install(FILES ${file} DESTINATION include/${lib}/${dir}) + install( + FILES ${file} + DESTINATION include/${lib}/${dir} + COMPONENT vpp-dev + ) endforeach() endif() endmacro() |