- cleanups in build process for Android
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
project (ice_stack)
|
||||
|
||||
# Rely on C++ 11
|
||||
set (CMAKE_CXX_STANDARD 11)
|
||||
# Rely on C++ 17
|
||||
set (CMAKE_CXX_STANDARD 17)
|
||||
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
@@ -34,6 +34,10 @@ set (ICE_STACK_SOURCES ICEAddress.cpp
|
||||
ICETime.cpp
|
||||
ICETransactionList.cpp)
|
||||
|
||||
if (ANDROID_ABI)
|
||||
set (ICE_STACK_SOURCES ${ICE_STACK_SOURCES} android-ifaddrs/android-ifaddrs.h android-ifaddrs/android-ifaddrs.c)
|
||||
endif()
|
||||
|
||||
if (TARGET_MUSL)
|
||||
add_definitions(-DTARGET_MUSL)
|
||||
endif()
|
||||
|
||||
@@ -25,8 +25,10 @@
|
||||
|
||||
#ifndef _IFADDRS_H_
|
||||
#define _IFADDRS_H_
|
||||
/*
|
||||
struct ifaddrs {
|
||||
|
||||
#include <ifaddrs.h>
|
||||
|
||||
/*struct ifaddrs {
|
||||
struct ifaddrs *ifa_next;
|
||||
char *ifa_name;
|
||||
unsigned int ifa_flags;
|
||||
@@ -36,6 +38,7 @@ struct ifaddrs {
|
||||
void *ifa_data;
|
||||
};
|
||||
*/
|
||||
|
||||
/*
|
||||
* This may have been defined in <net/if.h>. Note that if <net/if.h> is
|
||||
* to be included it must be included before this header file.
|
||||
|
||||
@@ -46,4 +46,14 @@ else()
|
||||
set (PLATFORM_DEFINES HAVE_WINSOCK2_H)
|
||||
endif()
|
||||
|
||||
if (ANDROID_ABI)
|
||||
if (CMAKE_ANDROID_ARCH_ABI MATCHES "arm.*")
|
||||
set (PLATFORM_DEFINES ${PLATFORM_DEFINES} CPU_RISC)
|
||||
else()
|
||||
set (PLATFORM_DEFINES ${PLATFORM_DEFINES} CPU_CISC)
|
||||
endif()
|
||||
else()
|
||||
set (PLATFORM_DEFINES ${PLATFORM_DEFINES} CPU_CISC)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(srtp PUBLIC -DHAVE_INTTYPES_H -D${PLATFORM_DEFINES})
|
||||
|
||||
Reference in New Issue
Block a user