aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl/libhicnctrl/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'ctrl/libhicnctrl/src/CMakeLists.txt')
-rw-r--r--ctrl/libhicnctrl/src/CMakeLists.txt50
1 files changed, 24 insertions, 26 deletions
diff --git a/ctrl/libhicnctrl/src/CMakeLists.txt b/ctrl/libhicnctrl/src/CMakeLists.txt
index f5d3c49a3..f9934d70e 100644
--- a/ctrl/libhicnctrl/src/CMakeLists.txt
+++ b/ctrl/libhicnctrl/src/CMakeLists.txt
@@ -15,41 +15,25 @@ list(APPEND COMPILER_DEFINITIONS
"-DWITH_POLICY"
)
-set(HEADER_FILES
- api.h
- commands.h
- face.h
-)
-
-set(UTIL_HEADER_FILES
- face.h
-)
-
set(SOURCE_FILES
face.c
route.c
+ api.c
)
-if(BUILD_HICNPLUGIN)
- set(SOURCE_FILES
- ${SOURCE_FILES}
- hicn_plugin_api.c
- )
-else ()
- set(SOURCE_FILES
- ${SOURCE_FILES}
- api.c
- )
-endif()
+set(HEADER_FILES
+ api_private.h
+)
set(LIBRARIES
m
+ dl
${HICN_LIBRARIES}
)
set(INCLUDE_DIRS
- ./
- ../includes/
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/../includes/
${HICN_INCLUDE_DIRS}
)
@@ -61,9 +45,17 @@ else ()
set(LINK_TYPE SHARED STATIC)
endif ()
+if (${CMAKE_SYSTEM_NAME} MATCHES Android)
+ list(APPEND SOURCE_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/modules/hicn_light_api.c
+ )
+else()
+ add_subdirectory(modules)
+endif()
+
build_library(${LIBHICNCTRL}
${LINK_TYPE}
- SOURCES ${SOURCE_FILES}
+ SOURCES ${SOURCE_FILES} ${HEADER_FILES}
INSTALL_HEADERS ${TO_INSTALL_HEADER_FILES}
LINK_LIBRARIES ${LIBRARIES}
DEPENDS ${DEPENDENCIES}
@@ -74,7 +66,13 @@ build_library(${LIBHICNCTRL}
)
if (NOT DISABLE_EXECUTABLES)
- set(LIBRARIES ${LIBRARIES} ${LIBHICN_SHARED} ${LIBHICNCTRL_SHARED})
+ if (DISABLE_SHARED_LIBRARIES)
+ set(LIBRARIES ${LIBRARIES} ${LIBHICNCTRL_STATIC})
+ set(DEPENDENCIES ${LIBHICNCTRL_STATIC})
+ else ()
+ set(LIBRARIES ${LIBRARIES} ${LIBHICN_SHARED} ${LIBHICNCTRL_SHARED})
+ set(DEPENDENCIES ${LIBHICNCTRL_SHARED})
+ endif ()
list(APPEND DAEMON_SRC
cli.c
@@ -83,7 +81,7 @@ if (NOT DISABLE_EXECUTABLES)
build_executable(${HICNCTRL}
SOURCES ${DAEMON_SRC}
LINK_LIBRARIES ${LIBRARIES}
- DEPENDS ${LIBHICNCTRL_SHARED}
+ DEPENDS ${DEPENDENCIES}
COMPONENT ${LIBHICNCTRL_COMPONENT}
INCLUDE_DIRS ${INCLUDE_DIRS}
DEFINITIONS ${COMPILER_DEFINITIONS}