summaryrefslogtreecommitdiffstats
path: root/extras/libmemif/src/CMakeLists.txt
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-05-07 16:49:45 +0200
committerFlorin Coras <florin.coras@gmail.com>2020-05-08 17:01:32 +0000
commit599efc67e87e89666d44efd34b5d3db7ccf1f4ca (patch)
tree5ced205cb5ff5247e8e9b596295d4ab4d60319c5 /extras/libmemif/src/CMakeLists.txt
parent13f64ce2272539d97b8c499e8e298a053fb3c9e2 (diff)
build: various improvements
- add option to install only host tools - add option to specify lib and runtime dir Type: improvement Change-Id: I6356b52df459120fc9b0127948bae7679fb10e52 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'extras/libmemif/src/CMakeLists.txt')
-rw-r--r--extras/libmemif/src/CMakeLists.txt21
1 files changed, 12 insertions, 9 deletions
diff --git a/extras/libmemif/src/CMakeLists.txt b/extras/libmemif/src/CMakeLists.txt
index 09a2e4e6005..aced550ff5d 100644
--- a/extras/libmemif/src/CMakeLists.txt
+++ b/extras/libmemif/src/CMakeLists.txt
@@ -32,12 +32,15 @@ list(APPEND MEMIF_SOURCES
include_directories(${HEADERS_DIR})
-add_vpp_library(${LIBMEMIF}
- SOURCES ${MEMIF_SOURCES}
-
- INSTALL_HEADERS ${MEMIF_HEADERS}
-
- LINK_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}
-
- COMPONENT libmemif
-)
+add_library(memif SHARED ${MEMIF_SOURCES})
+target_link_libraries(memif ${CMAKE_THREAD_LIBS_INIT})
+foreach(file ${MEMIF_HEADERS})
+ get_filename_component(dir ${file} DIRECTORY)
+ install(
+ FILES ${file}
+ DESTINATION include/${lib}/${dir}
+ COMPONENT libmemif-dev
+ )
+endforeach()
+
+install(TARGETS memif DESTINATION lib COMPONENT libmemif)