diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-12-03 16:00:27 +0000 |
---|---|---|
committer | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-12-04 09:08:34 +0000 |
commit | 36d699cc16a609cb7cd87945b5a618448dca5889 (patch) | |
tree | 9e9d6acdfcf53a33ffc81c6c630ab86b18fd728e /ctrl/libhicnctrl/CMakeLists.txt | |
parent | ac2224ae8845f414c1a7fa85aab4e7287fb1df84 (diff) |
[HICN-428] Creating libctrl deb and rpm packages specific for hicn-plugin
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Change-Id: I2460276eb400777105d3351dffdaf8452f01c51f
Diffstat (limited to 'ctrl/libhicnctrl/CMakeLists.txt')
-rw-r--r-- | ctrl/libhicnctrl/CMakeLists.txt | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/ctrl/libhicnctrl/CMakeLists.txt b/ctrl/libhicnctrl/CMakeLists.txt index 59620088e..2a131f155 100644 --- a/ctrl/libhicnctrl/CMakeLists.txt +++ b/ctrl/libhicnctrl/CMakeLists.txt @@ -34,25 +34,32 @@ set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_MACOSX_RPATH ON) if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) - - if (BUILD_CTRL_HICNPLUGIN AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + set(HICNCTRL hicnctrl) + set(LIBHICNCTRL hicnctrl) + if (BUILD_HICNPLUGIN AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + set(LIBHICNCTRL ${LIBHICNCTRL}-plugin) find_package_wrapper(HicnPlugin REQUIRED) - else () - find_package_wrapper(Libhicn REQUIRED) + list(APPEND HICN_LIBRARIES ${HICNPLUGIN_LIBRARIES}) + set(LINK_FLAGS "-Wl,-unresolved-symbols=ignore-in-shared-libs") endif() - set(HICNCTRL hicnctrl) - set(LIBHICNCTRL hicnctrl) + find_package_wrapper(Libhicn REQUIRED) + list(APPEND HICN_LIBRARIES ${LIBHICN_SHARED}) + set(LIBHICNCTRL_SHARED ${LIBHICNCTRL}.shared) set(LIBHICNCTRL_STATIC ${LIBHICNCTRL}.static) + set(HICN_INCLUDE_DIRS + ${HICN_INCLUDE_DIRS} + ${HICNPLUGIN_INCLUDE_DIRS}) + else() if (${CMAKE_SYSTEM_NAME} STREQUAL "Android") set(HICN_LIBRARIES ${LIBHICN_STATIC} log) list(APPEND DEPENDENCIES ${LIBHICN_STATIC} ) - elseif (BUILD_CTRL_HICNPLUGIN AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + elseif (BUILD_HICNPLUGIN AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") set(HICN_INCLUDE_DIRS ${HICN_INCLUDE_DIRS} ${HICNPLUGIN_INCLUDE_DIRS}) |