aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl/libhicnctrl/CMakeLists.txt
diff options
context:
space:
mode:
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)