diff options
author | Mauro Sardara <msardara@cisco.com> | 2019-05-16 15:46:10 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2019-05-16 15:46:10 +0000 |
commit | 41ed041613107ae6f1bf9cae5147cfdc71a1ba54 (patch) | |
tree | c67e8bcd830e348c0a905fe52d48a248c0031132 /hicn-light/src/hicn/CMakeLists.txt | |
parent | db8d063677b42c0ec8191728e55d1d5efef80822 (diff) | |
parent | 5c9b2cd16e76b7d731bd31422b4a555dbeff1541 (diff) |
Merge "[HICN-195] Generate static libs for android"
Diffstat (limited to 'hicn-light/src/hicn/CMakeLists.txt')
-rw-r--r-- | hicn-light/src/hicn/CMakeLists.txt | 43 |
1 files changed, 31 insertions, 12 deletions
diff --git a/hicn-light/src/hicn/CMakeLists.txt b/hicn-light/src/hicn/CMakeLists.txt index 1b63f7535..bcef7c9dd 100644 --- a/hicn-light/src/hicn/CMakeLists.txt +++ b/hicn-light/src/hicn/CMakeLists.txt @@ -1,7 +1,7 @@ # Define a few configuration variables that we want accessible in the software include(BuildMacros) -configure_file(config.h.in config.h @ONLY) +configure_file(config.h.in hicn-light/config.h @ONLY) if(NOT ANDROID_API AND NOT COMPILE_FOR_IOS) add_subdirectory(command_line) @@ -20,7 +20,7 @@ add_subdirectory(strategies) add_subdirectory(utils) list(APPEND HEADER_FILES - ${CMAKE_CURRENT_BINARY_DIR}/config.h + ${CMAKE_CURRENT_BINARY_DIR}/hicn-light/config.h ) if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND ENABLE_PUNTING) @@ -35,17 +35,36 @@ list(APPEND COMPILER_DEFINITIONS list(INSERT HICN_LIGHT_INCLUDE_DIRS 0 ${CMAKE_CURRENT_SOURCE_DIR}/.. + ${CMAKE_CURRENT_BINARY_DIR}/.. ) -build_library(${LIBHICN_LIGHT} - STATIC NO_DEV - SOURCES ${SOURCE_FILES} - INSTALL_HEADERS ${TO_INSTALL_HEADER_FILES} - LINK_LIBRARIES ${LIBRARIES} - DEPENDS ${DEPENDENCIES} - COMPONENT ${LIBHICN_LIGHT} - INCLUDE_DIRS ${HICN_LIGHT_INCLUDE_DIRS} - INSTALL_ROOT_DIR hicn - DEFINITIONS ${COMPILER_DEFINITIONS} +list(APPEND TO_INSTALL_HEADER_FILES + ${CMAKE_CURRENT_BINARY_DIR}/hicn-light/config.h ) +if (ANDROID_API) + build_library(${LIBHICN_LIGHT} + STATIC + SOURCES ${SOURCE_FILES} + INSTALL_HEADERS ${TO_INSTALL_HEADER_FILES} + LINK_LIBRARIES ${LIBRARIES} + DEPENDS ${DEPENDENCIES} + COMPONENT ${LIBHICN_LIGHT} + INCLUDE_DIRS ${HICN_LIGHT_INCLUDE_DIRS} + INSTALL_ROOT_DIR hicn + DEFINITIONS ${COMPILER_DEFINITIONS} + ) +else () + build_library(${LIBHICN_LIGHT} + STATIC NO_DEV + SOURCES ${SOURCE_FILES} + INSTALL_HEADERS ${TO_INSTALL_HEADER_FILES} + LINK_LIBRARIES ${LIBRARIES} + DEPENDS ${DEPENDENCIES} + COMPONENT ${LIBHICN_LIGHT} + INCLUDE_DIRS ${HICN_LIGHT_INCLUDE_DIRS} + INSTALL_ROOT_DIR hicn + DEFINITIONS ${COMPILER_DEFINITIONS} + ) +endif () + |