summaryrefslogtreecommitdiffstats
path: root/hicn-light
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-light')
-rw-r--r--hicn-light/CMakeLists.txt19
-rw-r--r--hicn-light/src/hicn/command_line/controller/CMakeLists.txt7
-rw-r--r--hicn-light/src/hicn/command_line/daemon/CMakeLists.txt7
-rw-r--r--hicn-light/src/hicn/config/CMakeLists.txt2
-rw-r--r--hicn-light/src/hicn/config/commandOps.c1
-rw-r--r--hicn-light/src/hicn/content_store/CMakeLists.txt2
-rw-r--r--hicn-light/src/hicn/core/CMakeLists.txt2
-rw-r--r--hicn-light/src/hicn/io/CMakeLists.txt2
-rw-r--r--hicn-light/src/hicn/messenger/CMakeLists.txt2
-rw-r--r--hicn-light/src/hicn/platforms/CMakeLists.txt2
-rw-r--r--hicn-light/src/hicn/processor/CMakeLists.txt2
-rw-r--r--hicn-light/src/hicn/socket/CMakeLists.txt2
-rw-r--r--hicn-light/src/hicn/strategies/CMakeLists.txt2
-rw-r--r--hicn-light/src/hicn/utils/CMakeLists.txt2
14 files changed, 21 insertions, 33 deletions
diff --git a/hicn-light/CMakeLists.txt b/hicn-light/CMakeLists.txt
index c9a536dd6..64b93d997 100644
--- a/hicn-light/CMakeLists.txt
+++ b/hicn-light/CMakeLists.txt
@@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
project(hicn-light)
@@ -42,7 +42,10 @@ endif ()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Android")
message("############ Detected cross compile for $ENV{CMAKE_SYSTEM_NAME}")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ANDROID_C_FLAGS}")
+ # Android uses static libs, so we need to link all the dependencies to the executable
+ find_package(OpenSSL REQUIRED)
+ find_package(LibEvent REQUIRED)
+ set(ANDROID_LIBRARIES ${LIBEVENT_LIBRARIES} ${OPENSSL_LIBRARIES})
endif()
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DLIBRTA_DISABLE_VALIDATION -DPARCLibrary_DISABLE_VALIDATION")
@@ -50,14 +53,14 @@ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DLIBRTA_DISABLE_VALIDATION
include(IosMacros)
include(WindowsMacros)
-find_package_wrapper(Libparc REQUIRED)
+find_package(Libparc REQUIRED)
set(HICN_LIGHT hicn-light CACHE INTERNAL "" FORCE)
set(HICN_LIGHT_CONTROL ${HICN_LIGHT}-control CACHE INTERNAL "" FORCE)
set(HICN_LIGHT_DAEMON ${HICN_LIGHT}-daemon CACHE INTERNAL "" FORCE)
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
- find_package_wrapper(Libhicn REQUIRED)
+ find_package(Libhicn REQUIRED)
else()
if (DISABLE_SHARED_LIBRARIES)
if (WIN32)
@@ -83,12 +86,12 @@ find_package(Threads REQUIRED)
set(LIBHICN_LIGHT hicn-light)
set(LIBHICN_LIGHT_STATIC ${LIBHICN_LIGHT}.static)
-set(HICN_LIGHT_LINK_LIBRARIES
- ${LIBHICN_LIGHT_STATIC}
- ${HICN_LIBRARIES}
+set(LIBRARIES
${LIBPARC_LIBRARIES}
+ ${HICN_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${WINDOWS_LIBRARIES}
+ ${ANDROID_LIBRARIES}
)
set(HICN_LIGHT_LIBRARIES_LIST "${LIBPARC_LIBRARIES};${CMAKE_THREAD_LIBS_INIT};${WINDOWS_LIBRARIES}" CACHE INTERNAL "HICN_LIGHT_LIBRARIES_LIST")
@@ -102,7 +105,7 @@ list(APPEND HICN_LIGHT_INCLUDE_DIRS
)
if (UNIX)
- list(APPEND HICN_LIGHT_LINK_LIBRARIES
+ list(APPEND LIBRARIES
m
)
endif()
diff --git a/hicn-light/src/hicn/command_line/controller/CMakeLists.txt b/hicn-light/src/hicn/command_line/controller/CMakeLists.txt
index 68caa7dc8..4cbd49220 100644
--- a/hicn-light/src/hicn/command_line/controller/CMakeLists.txt
+++ b/hicn-light/src/hicn/command_line/controller/CMakeLists.txt
@@ -20,11 +20,16 @@ if (WIN32)
endif()
if (NOT DISABLE_EXECUTABLES)
+ if (${CMAKE_SYSTEM_NAME} MATCHES Android)
+ set(LINK_FLAGS "-Wl,--unresolved-symbols=ignore-in-object-files")
+ endif()
+
build_executable(${HICN_LIGHT_CONTROL}
SOURCES ${CONTROLLER_SRC}
- LINK_LIBRARIES ${HICN_LIGHT_LINK_LIBRARIES}
+ LINK_LIBRARIES ${LIBHICN_LIGHT_STATIC}
DEPENDS ${LIBHICN_LIGHT_STATIC}
COMPONENT ${HICN_LIGHT}
DEFINITIONS ${COMPILER_DEFINITIONS}
+ LINK_FLAGS ${LINK_FLAGS}
)
endif ()
diff --git a/hicn-light/src/hicn/command_line/daemon/CMakeLists.txt b/hicn-light/src/hicn/command_line/daemon/CMakeLists.txt
index ce62b51e2..a86826f09 100644
--- a/hicn-light/src/hicn/command_line/daemon/CMakeLists.txt
+++ b/hicn-light/src/hicn/command_line/daemon/CMakeLists.txt
@@ -14,14 +14,15 @@
list(APPEND DAEMON_SRC
hicnLightDaemon_main.c
)
+
if (WIN32)
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:\"LIBCMT\"" )
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:\"LIBCMT\"")
endif()
-if (NOT DISABLE_EXECUTABLES)
+if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Android")
build_executable(${HICN_LIGHT_DAEMON}
SOURCES ${DAEMON_SRC}
- LINK_LIBRARIES ${HICN_LIGHT_LINK_LIBRARIES}
+ LINK_LIBRARIES ${LIBHICN_LIGHT_STATIC}
DEPENDS ${LIBHICN_LIGHT_STATIC}
COMPONENT ${HICN_LIGHT}
DEFINITIONS ${COMPILER_DEFINITIONS}
diff --git a/hicn-light/src/hicn/config/CMakeLists.txt b/hicn-light/src/hicn/config/CMakeLists.txt
index 45f36e8ff..104026355 100644
--- a/hicn-light/src/hicn/config/CMakeLists.txt
+++ b/hicn-light/src/hicn/config/CMakeLists.txt
@@ -11,8 +11,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
-
list(APPEND HEADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/commandOps.h
${CMAKE_CURRENT_SOURCE_DIR}/commandParser.h
diff --git a/hicn-light/src/hicn/config/commandOps.c b/hicn-light/src/hicn/config/commandOps.c
index b00e48e2a..dd8e148d0 100644
--- a/hicn-light/src/hicn/config/commandOps.c
+++ b/hicn-light/src/hicn/config/commandOps.c
@@ -13,7 +13,6 @@
* limitations under the License.
*/
-
#include <hicn/hicn-light/config.h>
#include <stdbool.h>
#include <stdint.h>
diff --git a/hicn-light/src/hicn/content_store/CMakeLists.txt b/hicn-light/src/hicn/content_store/CMakeLists.txt
index 85643cf5e..aaf256118 100644
--- a/hicn-light/src/hicn/content_store/CMakeLists.txt
+++ b/hicn-light/src/hicn/content_store/CMakeLists.txt
@@ -11,8 +11,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
-
list(APPEND HEADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/contentStoreEntry.h
${CMAKE_CURRENT_SOURCE_DIR}/contentStoreInterface.h
diff --git a/hicn-light/src/hicn/core/CMakeLists.txt b/hicn-light/src/hicn/core/CMakeLists.txt
index 5e2b696d7..1b13be91f 100644
--- a/hicn-light/src/hicn/core/CMakeLists.txt
+++ b/hicn-light/src/hicn/core/CMakeLists.txt
@@ -11,8 +11,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
-
list(APPEND HEADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/connectionManager.h
${CMAKE_CURRENT_SOURCE_DIR}/connectionState.h
diff --git a/hicn-light/src/hicn/io/CMakeLists.txt b/hicn-light/src/hicn/io/CMakeLists.txt
index eb69485a5..cc4f7371f 100644
--- a/hicn-light/src/hicn/io/CMakeLists.txt
+++ b/hicn-light/src/hicn/io/CMakeLists.txt
@@ -11,8 +11,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
-
list(APPEND HEADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/addressPair.h
${CMAKE_CURRENT_SOURCE_DIR}/ioOperations.h
diff --git a/hicn-light/src/hicn/messenger/CMakeLists.txt b/hicn-light/src/hicn/messenger/CMakeLists.txt
index 92bc13b5b..69a6c32d1 100644
--- a/hicn-light/src/hicn/messenger/CMakeLists.txt
+++ b/hicn-light/src/hicn/messenger/CMakeLists.txt
@@ -11,8 +11,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
-
list(APPEND HEADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/missiveDeque.h
${CMAKE_CURRENT_SOURCE_DIR}/missive.h
diff --git a/hicn-light/src/hicn/platforms/CMakeLists.txt b/hicn-light/src/hicn/platforms/CMakeLists.txt
index 191a72213..4073e0558 100644
--- a/hicn-light/src/hicn/platforms/CMakeLists.txt
+++ b/hicn-light/src/hicn/platforms/CMakeLists.txt
@@ -11,8 +11,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
-
if(${CMAKE_SYSTEM_NAME} STREQUAL "Android")
list(APPEND SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/android/system.c
diff --git a/hicn-light/src/hicn/processor/CMakeLists.txt b/hicn-light/src/hicn/processor/CMakeLists.txt
index b7eeabe3b..17c3b1f88 100644
--- a/hicn-light/src/hicn/processor/CMakeLists.txt
+++ b/hicn-light/src/hicn/processor/CMakeLists.txt
@@ -11,8 +11,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
-
list(APPEND HEADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/fibEntry.h
${CMAKE_CURRENT_SOURCE_DIR}/fibEntryList.h
diff --git a/hicn-light/src/hicn/socket/CMakeLists.txt b/hicn-light/src/hicn/socket/CMakeLists.txt
index 775693bf0..8c8a757fb 100644
--- a/hicn-light/src/hicn/socket/CMakeLists.txt
+++ b/hicn-light/src/hicn/socket/CMakeLists.txt
@@ -11,8 +11,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
-
if (UNIX AND NOT APPLE)
list(APPEND HEADER_FILES
socket/api.h
diff --git a/hicn-light/src/hicn/strategies/CMakeLists.txt b/hicn-light/src/hicn/strategies/CMakeLists.txt
index 400efcde9..886aa137c 100644
--- a/hicn-light/src/hicn/strategies/CMakeLists.txt
+++ b/hicn-light/src/hicn/strategies/CMakeLists.txt
@@ -11,8 +11,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
-
list(APPEND HEADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/strategyImpl.h
${CMAKE_CURRENT_SOURCE_DIR}/loadBalancer.h
diff --git a/hicn-light/src/hicn/utils/CMakeLists.txt b/hicn-light/src/hicn/utils/CMakeLists.txt
index 1ab38deba..c8c9b8487 100644
--- a/hicn-light/src/hicn/utils/CMakeLists.txt
+++ b/hicn-light/src/hicn/utils/CMakeLists.txt
@@ -11,8 +11,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
-
list(APPEND HEADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/address.h
${CMAKE_CURRENT_SOURCE_DIR}/addressList.h