diff options
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 () + |