diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-12-04 09:47:10 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2019-12-04 09:47:10 +0000 |
commit | 0a60657a56073c1c1d043a63b93cffd764ca40d3 (patch) | |
tree | 12b759df4b748379b2d062b581d1f7a94eb2dcfb /ctrl/libhicnctrl/CMakeLists.txt | |
parent | 3e0ff4e7897bb8bc03538f1b2643fe73de158714 (diff) | |
parent | 36d699cc16a609cb7cd87945b5a618448dca5889 (diff) |
Merge "[HICN-428] Creating libctrl deb and rpm packages specific for hicn-plugin"
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}) |