Skip to content

Commit

Permalink
fix mips compile error (#1532)
Browse files Browse the repository at this point in the history
* fix mips compile error

* fix mips compile error

* fix mips compile error
  • Loading branch information
vc60er authored Oct 17, 2022
1 parent 8f7ba52 commit 3036e6a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
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

0 comments on commit 3036e6a

Please sign in to comment.