diff options
author | Mauro <you@example.com> | 2021-06-30 07:57:22 +0000 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2021-07-06 16:16:04 +0000 |
commit | 08233d44a6cfde878d7e10bca38ae935ed1c8fd5 (patch) | |
tree | 7ecc534d55bdc7e8dd15ecab084720910bcdf4d9 /hicn-light/CMakeLists.txt | |
parent | 147ba39bed26887f5eba84757e2463ab8e370a9a (diff) |
[HICN-713] Transport Library Major Refactoring 2
Co-authored-by: Luca Muscariello <muscariello@ieee.org>
Co-authored-by: Michele Papalini <micpapal@cisco.com>
Co-authored-by: Olivier Roques <oroques+fdio@cisco.com>
Co-authored-by: Giulio Grassi <gigrassi@cisco.com>
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: I5b2c667bad66feb45abdb5effe22ed0f6c85d1c2
Diffstat (limited to 'hicn-light/CMakeLists.txt')
-rw-r--r-- | hicn-light/CMakeLists.txt | 19 |
1 files changed, 11 insertions, 8 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() |