Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix mips compile error #1532

Merged
merged 3 commits into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMake/Dependencies/libsrtp-CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ ExternalProject_Add(project_libsrtp
-D ENABLE_OPENSSL=${LIBSRTP_ENABLE_OPENSSL}
-D BUILD_SHARED_LIBS=${LIBSRTP_SHARED_LIBS}
-D OPENSSL_ROOT_DIR=${OPEN_SRC_INSTALL_PREFIX}
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
CONFIGURE_COMMAND ${CONFIGURE_COMMAND}
TEST_COMMAND ""
)
4 changes: 3 additions & 1 deletion CMake/Dependencies/libusrsctp-CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ ExternalProject_Add(project_libusrsctp
GIT_REPOSITORY https://github.com/sctplab/usrsctp.git
GIT_TAG 1ade45cbadfd19298d2c47dc538962d4425ad2dd
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/build
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${OPEN_SRC_INSTALL_PREFIX} -DCMAKE_C_FLAGS=-fPIC -Dsctp_werror=0
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${OPEN_SRC_INSTALL_PREFIX}
"-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -fPIC"
-Dsctp_werror=0
BUILD_ALWAYS TRUE
TEST_COMMAND ""
)
17 changes: 11 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ endif()

set(KINESIS_VIDEO_WEBRTC_CLIENT_SRC "${CMAKE_CURRENT_SOURCE_DIR}")

if(ADD_MUCLIBC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -muclibc")
endif()


message(STATUS "Kinesis Video WebRTC Client path is ${KINESIS_VIDEO_WEBRTC_CLIENT_SRC}")
message(STATUS "dependencies install path is ${OPEN_SRC_INSTALL_PREFIX}")
Expand Down Expand Up @@ -121,7 +125,7 @@ if(BUILD_DEPENDENCIES)
set(OPENSSL_ROOT_DIR ${OPEN_SRC_INSTALL_PREFIX})
elseif(USE_MBEDTLS)
set(BUILD_ARGS -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS})
"-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -std=c99")
build_dependency(mbedtls ${BUILD_ARGS})
endif()

Expand All @@ -140,10 +144,14 @@ if(BUILD_DEPENDENCIES)
-DBUILD_LIBSRTP_DESTINATION_PLATFORM=${BUILD_LIBSRTP_DESTINATION_PLATFORM}
-DUSE_OPENSSL=${USE_OPENSSL}
-DUSE_MBEDTLS=${USE_MBEDTLS}
)
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS})

build_dependency(srtp ${BUILD_ARGS})

build_dependency(usrsctp)
set(BUILD_ARGS
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS})

build_dependency(usrsctp ${BUILD_ARGS})
if(BUILD_TEST)
build_dependency(gtest)
endif()
Expand Down Expand Up @@ -218,9 +226,6 @@ link_directories(${OPEN_SRC_INSTALL_PREFIX}/lib)
if("${CMAKE_C_COMPILER_ID}" MATCHES "GNU|Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")

if(ADD_MUCLIBC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -muclibc")
endif()

if(CODE_COVERAGE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g -fprofile-arcs -ftest-coverage")
Expand Down