- cleanups in build process for Android
This commit is contained in:
parent
c6e7574976
commit
125063b411
|
|
@ -73,6 +73,9 @@ message("Libraries: ${LIB_PLATFORM}")
|
||||||
set (OPENSSL_INCLUDE ${LIB_PLATFORM}/openssl/1.1/include)
|
set (OPENSSL_INCLUDE ${LIB_PLATFORM}/openssl/1.1/include)
|
||||||
message ("Using OpenSSL include files from ${OPENSSL_INCLUDE}")
|
message ("Using OpenSSL include files from ${OPENSSL_INCLUDE}")
|
||||||
|
|
||||||
|
add_definitions(-DUSE_OPENSSL)
|
||||||
|
include_directories(${OPENSSL_INCLUDE})
|
||||||
|
|
||||||
if (CMAKE_SYSTEM MATCHES "Windows*")
|
if (CMAKE_SYSTEM MATCHES "Windows*")
|
||||||
add_definitions (-DTARGET_WIN -D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS -D_UNICODE -D_CRT_SECURE_NO_WARNINGS)
|
add_definitions (-DTARGET_WIN -D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS -D_UNICODE -D_CRT_SECURE_NO_WARNINGS)
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -199,9 +202,10 @@ endif()
|
||||||
|
|
||||||
|
|
||||||
target_link_libraries(rtphone
|
target_link_libraries(rtphone
|
||||||
|
${LIBS}
|
||||||
${OPENSSL_SSL}
|
${OPENSSL_SSL}
|
||||||
${OPENSSL_CRYPTO}
|
${OPENSSL_CRYPTO}
|
||||||
${LIBS} )
|
)
|
||||||
|
|
||||||
|
|
||||||
target_include_directories(rtphone
|
target_include_directories(rtphone
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
project (ice_stack)
|
project (ice_stack)
|
||||||
|
|
||||||
# Rely on C++ 11
|
# Rely on C++ 17
|
||||||
set (CMAKE_CXX_STANDARD 11)
|
set (CMAKE_CXX_STANDARD 17)
|
||||||
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
|
|
@ -34,6 +34,10 @@ set (ICE_STACK_SOURCES ICEAddress.cpp
|
||||||
ICETime.cpp
|
ICETime.cpp
|
||||||
ICETransactionList.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)
|
if (TARGET_MUSL)
|
||||||
add_definitions(-DTARGET_MUSL)
|
add_definitions(-DTARGET_MUSL)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,10 @@
|
||||||
|
|
||||||
#ifndef _IFADDRS_H_
|
#ifndef _IFADDRS_H_
|
||||||
#define _IFADDRS_H_
|
#define _IFADDRS_H_
|
||||||
/*
|
|
||||||
struct ifaddrs {
|
#include <ifaddrs.h>
|
||||||
|
|
||||||
|
/*struct ifaddrs {
|
||||||
struct ifaddrs *ifa_next;
|
struct ifaddrs *ifa_next;
|
||||||
char *ifa_name;
|
char *ifa_name;
|
||||||
unsigned int ifa_flags;
|
unsigned int ifa_flags;
|
||||||
|
|
@ -36,6 +38,7 @@ struct ifaddrs {
|
||||||
void *ifa_data;
|
void *ifa_data;
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This may have been defined in <net/if.h>. Note that if <net/if.h> is
|
* 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.
|
* to be included it must be included before this header file.
|
||||||
|
|
|
||||||
|
|
@ -46,4 +46,14 @@ else()
|
||||||
set (PLATFORM_DEFINES HAVE_WINSOCK2_H)
|
set (PLATFORM_DEFINES HAVE_WINSOCK2_H)
|
||||||
endif()
|
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})
|
target_compile_definitions(srtp PUBLIC -DHAVE_INTTYPES_H -D${PLATFORM_DEFINES})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue