aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl/libhicnctrl/CMakeLists.txt
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2019-10-07 14:37:42 +0000
committerGerrit Code Review <gerrit@fd.io>2019-10-07 14:37:42 +0000
commit7896701a177d66f376172ab43df4b0c1d5d867a3 (patch)
treea89986dcceb1d5b6faa7ae529b1d4a1e9f4d6d85 /ctrl/libhicnctrl/CMakeLists.txt
parent108c55669102931acc9bd99ca9918379722732b8 (diff)
parent6b84ec54083da9911f5ad4816d0eb4f4745afad4 (diff)
Merge "[HICN-298] Release new hICN app for Android"
Diffstat (limited to 'ctrl/libhicnctrl/CMakeLists.txt')
-rw-r--r--ctrl/libhicnctrl/CMakeLists.txt31
1 files changed, 24 insertions, 7 deletions
diff --git a/ctrl/libhicnctrl/CMakeLists.txt b/ctrl/libhicnctrl/CMakeLists.txt
index cb1bd722c..6b67544ee 100644
--- a/ctrl/libhicnctrl/CMakeLists.txt
+++ b/ctrl/libhicnctrl/CMakeLists.txt
@@ -26,21 +26,38 @@ set(CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules"
)
+include(BuildMacros)
+
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_MACOSX_RPATH ON)
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
- set(HICN_CTRL hicn-ctrl)
- set(LIBHICN_CTRL hicn-ctrl)
- set(LIBHICN_CTRL_SHARED ${LIBHICNCTRL}.shared)
- set(LIBHICN_CTRL_STATIC ${LIBHICNCTRL}.static)
-endif()
-set(LIBHICNCTRL_COMPONENT lib${LIBHICN_CTRL})
+ find_package_wrapper(Libhicn REQUIRED)
+
+ set(HICNCTRL hicnctrl)
+ set(LIBHICNCTRL hicnctrl)
+ set(LIBHICNCTRL_SHARED ${LIBHICNCTRL}.shared)
+ set(LIBHICNCTRL_STATIC ${LIBHICNCTRL}.static)
+
+else()
+ if (${CMAKE_SYSTEM_NAME} STREQUAL "Android")
+ set(HICN_LIBRARIES ${LIBHICN_STATIC})
+ list(APPEND DEPENDENCIES
+ ${LIBHICN_STATIC}
+ )
+ else ()
+ set(HICN_LIBRARIES ${LIBHICN_SHARED})
+ list(APPEND DEPENDENCIES
+ ${LIBHICN_SHARED}
+ )
+ endif ()
+
+endif()
-set(TO_INSTALL_HEADER_FILES)
+set(LIBHICNCTRL_COMPONENT lib${LIBHICNCTRL})
add_subdirectory(includes)
add_subdirectory(src)