Commit ee6a6fbc authored by Ghislain MARY's avatar Ghislain MARY

Handle build for Android with CMake.

parent 140df465
......@@ -20,7 +20,9 @@
#
############################################################################
set(LIBS ${CMAKE_THREAD_LIBS_INIT})
if(NOT ANDROID)
set(LIBS ${CMAKE_THREAD_LIBS_INIT})
endif()
if(HAVE_RT)
list(APPEND LIBS rt)
endif()
......@@ -95,6 +97,9 @@ endif()
if(ENABLE_SHARED)
add_library(ortp SHARED ${ORTP_HEADER_FILES} ${ORTP_SOURCE_FILES_C} ${ORTP_SOURCE_FILES_CXX})
set_target_properties(ortp PROPERTIES VERSION ${ORTP_SO_VERSION})
if(ANDROID)
set_target_properties(ortp PROPERTIES OUTPUT_NAME "ortp-${CMAKE_SYSTEM_PROCESSOR}")
endif()
target_link_libraries(ortp ${LIBS})
if(MSVC)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
......
......@@ -857,7 +857,7 @@ static int ortp_wincrypto_random(unsigned int *rand_number){
return 0;
}
#endif
#else
#elif (defined(__QNXNTO__) || defined(__linux) || defined(__APPLE__)) && !defined(HAVE_ARC4RANDOM)
static unsigned int ortp_urandom(void) {
static int fd=-1;
......@@ -883,7 +883,7 @@ unsigned int ortp_random(void){
#else
return arc4random();
#endif
#elif defined(__linux) || defined(__APPLE__)
#elif defined(__linux) || defined(__APPLE__)
return ortp_urandom();
#elif defined(_WIN32)
static int initd=0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment