aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngelo Mantellini (manangel) <angelo.mantellini@irt-systemx.fr>2017-04-25 20:21:27 +0200
committerAngelo Mantellini (manangel) <angelo.mantellini@irt-systemx.fr>2017-04-25 20:21:27 +0200
commit307d69f67c01dbf05b1da447589645713d6ca27b (patch)
tree9051d78b395f58855a687fb7d281bfb44bcbea3e
parent1db24e58a84687c973ec12d293ece4cdd2a63b40 (diff)
add android correction
Change-Id: If674233c81fa2236aa5973d9545fa316d66acb7a Signed-off-by: Angelo Mantellini (manangel) <angelo.mantellini@irt-systemx.fr>
-rw-r--r--CMakeLists.txt11
-rw-r--r--icnet/CMakeLists.txt9
2 files changed, 16 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 448622bb..f1f8bf93 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,8 +70,14 @@ set(CMAKE_VERBOSE_MAKEFILE off)
if(ANDROID_API)
include_directories(${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/4.9/include)
include_directories(${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include)
+ set(CCNX_PORTAL_LIBRARIES "$ENV{CCNX_DEPENDENCIES}/lib/libccnx_api_portal.a" )
+ set(CCNX_TRANSPORT_RTA_LIBRARIES "$ENV{CCNX_DEPENDENCIES}/lib/libccnx_api_notify.a" "$ENV{CCNX_DEPENDENCIES}/lib/libccnx_api_control.a" "$ENV{CCNX_DEPENDENCIES}/lib/libccnx_transport_rta.a")
+ set(CCNX_COMMON_LIBRARIES "$ENV{CCNX_DEPENDENCIES}/lib/libccnx_common.a")
+ set(LIBPARC_LIBRARIES "$ENV{CCNX_DEPENDENCIES}/lib/libparc.a")
+ set(LONGBOW_LIBRARIES "$ENV{CCNX_DEPENDENCIES}/lib/liblongbow.a" "$ENV{CCNX_DEPENDENCIES}/lib/liblongbow-ansiterm.a" "$ENV{CCNX_DEPENDENCIES}/lib/liblongbow-textplain.a" "$ENV{CCNX_DEPENDENCIES}/lib/libcrypto.a" "$ENV{CCNX_DEPENDENCIES}/lib/libssl.a")
set(Boost_LIBRARIES $ENV{CCNX_DEPENDENCIES}/lib/libboost_regex.a $ENV{CCNX_DEPENDENCIES}/lib/libboost_system.a $ENV{CCNX_DEPENDENCIES}/lib/libboost_thread.a $ENV{CCNX_DEPENDENCIES}/lib/libboost_filesystem.a $ENV{CCNX_DEPENDENCIES}/lib/libboost_date_time.a $ENV{CCNX_DEPENDENCIES}/lib/libboost_chrono.a)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS} ${ANDROID_C_FLAGS} -std=c++11 -Wall -fpermissive -O3")
+ set(ANDROID_LIBRARIES "${ANDROID_NDK}/platforms/android-23/arch-arm/usr/lib/libz.a" "${ANDROID_NDK}/platforms/android-23/arch-arm/usr/lib/liblog.so" "$ENV{NDK}/sources/cxx-stl/gnu-libstdc++/4.9/libs/$ENV{ABI}/libgnustl_shared.so" "$ENV{CCNX_DEPENDENCIES}/lib/libcrystax.a" "$ENV{CCNX_DEPENDENCIES}/lib/libevent.a")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS} ${ANDROID_C_FLAGS} -std=c++11 -Wall -fpermissive -O3")
else ()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -fpermissive -O3")
find_package(Boost 1.53.0 COMPONENTS system REQUIRED)
@@ -88,7 +94,8 @@ set(LIBRARIES
${LIBPARC_LIBRARIES}
${Boost_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
- ${LONGBOW_LIBRARIES})
+ ${LONGBOW_LIBRARIES}
+ ${ANDROID_LIBRARIES})
set(SUBFOLDERS ${SUBFOLDERS} icnet)
diff --git a/icnet/CMakeLists.txt b/icnet/CMakeLists.txt
index 6c164498..81252a5c 100644
--- a/icnet/CMakeLists.txt
+++ b/icnet/CMakeLists.txt
@@ -51,8 +51,13 @@ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
add_library(icnet STATIC ${SOURCE_FILES} ${ICNET_SOURCE_FILES} ${HEADER_FILES} ${ICNET_HEADER_FILES})
add_library(icnet.shared SHARED ${SOURCE_FILES} ${ICNET_SOURCE_FILES})
-target_link_libraries(icnet.shared ${LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES})
-target_link_libraries(icnet ${LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES})
+if(ANDROID_API)
+ target_link_libraries(icnet.shared ${LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES} ${CCNX_COMMON_LIBRARIES} ${CCNX_TRANSPORT_RTA_LIBRARIES} ${CCNX_PORTAL_LIBRARIES} ${LIBPARC_LIBRARIES} ${LONGBOW_LIBRARIES})
+ target_link_libraries(icnet ${LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES} ${CCNX_COMMON_LIBRARIES} ${CCNX_TRANSPORT_RTA_LIBRARIES} ${CCNX_PORTAL_LIBRARIES} ${LIBPARC_LIBRARIES} ${LONGBOW_LIBRARIES})
+else ()
+ target_link_libraries(icnet.shared ${LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES})
+ target_link_libraries(icnet ${LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES})
+endif (ANDROID_API)
set_target_properties(icnet.shared PROPERTIES
SOVERSION 1