aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2019-03-25 10:39:24 +0100
committerMauro Sardara <msardara@cisco.com>2019-03-25 12:20:33 +0100
commit558581790763815071e9c77e06047e689faf752f (patch)
treebbd8bd357e7ed588ea863116e2873c53260d697d
parent777974a5b295cbe7ff762358ac3e9dac4c502aaf (diff)
[HICN-141] Install headers in hicn-light component.
Change-Id: I3c7aef4f6ecd147156ecab6aaa6cb2845768645f Signed-off-by: Mauro Sardara <msardara@cisco.com>
-rw-r--r--cmake/Modules/BuildMacros.cmake9
-rw-r--r--hicn-light/src/hicn/CMakeLists.txt4
-rw-r--r--hicn-light/src/hicn/api/CMakeLists.txt11
-rw-r--r--hicn-light/src/hicn/command_line/controller/CMakeLists.txt4
-rw-r--r--hicn-light/src/hicn/command_line/daemon/CMakeLists.txt4
-rw-r--r--hicn-light/src/hicn/utils/CMakeLists.txt6
6 files changed, 21 insertions, 17 deletions
diff --git a/cmake/Modules/BuildMacros.cmake b/cmake/Modules/BuildMacros.cmake
index 0908189b5..e7244d2bc 100644
--- a/cmake/Modules/BuildMacros.cmake
+++ b/cmake/Modules/BuildMacros.cmake
@@ -62,7 +62,7 @@ endmacro()
macro(build_library lib)
cmake_parse_arguments(ARG
- "SHARED;STATIC"
+ "SHARED;STATIC;NO_DEV"
"COMPONENT;"
"SOURCES;LINK_LIBRARIES;INSTALL_HEADERS;DEPENDS;INCLUDE_DIRS;DEFINITIONS;INSTALL_ROOT_DIR"
${ARGN}
@@ -166,10 +166,15 @@ macro(build_library lib)
if (${dir} STREQUAL src)
set(dir "")
endif()
+
+ set(COMPONENT ${ARG_COMPONENT})
+ if (NOT ARG_NO_DEV)
+ set(COMPONENT ${COMPONENT}-dev)
+ endif()
install(
FILES ${file}
DESTINATION include/${ARG_INSTALL_ROOT_DIR}/${dir}
- COMPONENT ${ARG_COMPONENT}-dev
+ COMPONENT ${COMPONENT}
)
endforeach()
endif()
diff --git a/hicn-light/src/hicn/CMakeLists.txt b/hicn-light/src/hicn/CMakeLists.txt
index 2130c1c39..1b63f7535 100644
--- a/hicn-light/src/hicn/CMakeLists.txt
+++ b/hicn-light/src/hicn/CMakeLists.txt
@@ -38,14 +38,14 @@ list(INSERT HICN_LIGHT_INCLUDE_DIRS 0
)
build_library(${LIBHICN_LIGHT}
- STATIC
+ STATIC NO_DEV
SOURCES ${SOURCE_FILES}
INSTALL_HEADERS ${TO_INSTALL_HEADER_FILES}
LINK_LIBRARIES ${LIBRARIES}
DEPENDS ${DEPENDENCIES}
COMPONENT ${LIBHICN_LIGHT}
INCLUDE_DIRS ${HICN_LIGHT_INCLUDE_DIRS}
- INSTALL_ROOT_DIR hicn/light
+ INSTALL_ROOT_DIR hicn
DEFINITIONS ${COMPILER_DEFINITIONS}
)
diff --git a/hicn-light/src/hicn/api/CMakeLists.txt b/hicn-light/src/hicn/api/CMakeLists.txt
index c8bf16ff3..dd73bd10d 100644
--- a/hicn-light/src/hicn/api/CMakeLists.txt
+++ b/hicn-light/src/hicn/api/CMakeLists.txt
@@ -26,11 +26,16 @@ set(SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/api.c
)
+set(TO_INSTALL_HEADER_FILES
+ ${TO_INSTALL_HEADER_FILES}
+ ${HEADER_FILES}
+ PARENT_SCOPE
+)
+
build_library(hicn-light-ctrl
SHARED
SOURCES ${SOURCE_FILES}
- COMPONENT ${HICN_LIGHT}
- INSTALL_ROOT_DIR hicn
- INSTALL_HEADERS ${HEADER_FILES}
+ COMPONENT ${LIBHICN_LIGHT}
LINK_LIBRARIES ${HICN_LIGHT_LINK_LIBRARIES}
+ DEPENDS ${LIBHICN_LIGHT}
) \ No newline at end of file
diff --git a/hicn-light/src/hicn/command_line/controller/CMakeLists.txt b/hicn-light/src/hicn/command_line/controller/CMakeLists.txt
index b53e610a1..5fd38a7bc 100644
--- a/hicn-light/src/hicn/command_line/controller/CMakeLists.txt
+++ b/hicn-light/src/hicn/command_line/controller/CMakeLists.txt
@@ -18,6 +18,6 @@ list(APPEND CONTROLLER_SRC
build_executable(${HICN_LIGHT_CONTROL}
SOURCES ${CONTROLLER_SRC}
LINK_LIBRARIES ${HICN_LIGHT_LINK_LIBRARIES}
- DEPENDS hicn-light
- COMPONENT hicn-light
+ DEPENDS ${LIBHICN_LIGHT}
+ COMPONENT ${LIBHICN_LIGHT}
)
diff --git a/hicn-light/src/hicn/command_line/daemon/CMakeLists.txt b/hicn-light/src/hicn/command_line/daemon/CMakeLists.txt
index fd6cc9310..8c0df2901 100644
--- a/hicn-light/src/hicn/command_line/daemon/CMakeLists.txt
+++ b/hicn-light/src/hicn/command_line/daemon/CMakeLists.txt
@@ -18,6 +18,6 @@ list(APPEND DAEMON_SRC
build_executable(${HICN_LIGHT_DAEMON}
SOURCES ${DAEMON_SRC}
LINK_LIBRARIES ${HICN_LIGHT_LINK_LIBRARIES}
- DEPENDS hicn-light
- COMPONENT hicn-light
+ DEPENDS ${LIBHICN_LIGHT}
+ COMPONENT ${LIBHICN_LIGHT}
) \ No newline at end of file
diff --git a/hicn-light/src/hicn/utils/CMakeLists.txt b/hicn-light/src/hicn/utils/CMakeLists.txt
index 120061211..7d438d157 100644
--- a/hicn-light/src/hicn/utils/CMakeLists.txt
+++ b/hicn-light/src/hicn/utils/CMakeLists.txt
@@ -32,11 +32,5 @@ list(APPEND SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/utils.c
)
-set(TO_INSTALL_HEADER_FILES
- ${TO_INSTALL_HEADER_FILES}
- ${CMAKE_CURRENT_SOURCE_DIR}/commands.h
- PARENT_SCOPE
-)
-
set(SOURCE_FILES ${SOURCE_FILES} PARENT_SCOPE)
set(HEADER_FILES ${HEADER_FILES} PARENT_SCOPE) \ No newline at end of file