1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For #2532: Windows: Support CYGWIN64 for SRS (#3255)

1. Support cygwin by '--cygwin64=on'
2. Detect cygwin automatically.
3. Disalbe sanitizer, srt and srtp with openssl.
4. Disable multiple threads, use single threads.
5. Support utest for cygwin64.
6. Query features for windows by API.
7. Disable stat APIs for cygwin.
8. Use ST select event driver.

Co-authored-by: wenjie.zhao <740936897@qq.com>
This commit is contained in:
Winlin 2022-11-20 12:29:57 +08:00 committed by GitHub
parent 3d0dcb2a17
commit d741f81110
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 122 additions and 30 deletions

13
trunk/configure vendored
View file

@ -93,9 +93,11 @@ WarnLevel=" -Wall"
CppStd="-ansi"
if [[ $SRS_CXX11 == YES ]]; then
CppStd="-std=c++11"
if [[ $SRS_CYGWIN64 == YES ]]; then CppStd="-std=gnu++11"; fi
fi
if [[ $SRS_CXX14 == YES ]]; then
CppStd="-std=c++14"
if [[ $SRS_CYGWIN64 == YES ]]; then CppStd="-std=gnu++14"; fi
fi
# performance of gprof
SrsGprof=""; SrsGprofLink=""; if [[ $SRS_GPROF == YES ]]; then SrsGprof=" -pg -lc_p"; SrsGprofLink=" -pg"; fi
@ -204,7 +206,7 @@ if [[ $SRS_GCOV == YES ]]; then
fi
# For FFMPEG/RTC on Linux.
if [[ $SRS_OSX != YES && $SRS_RTC == YES && $SRS_FFMPEG_FIT == YES ]]; then
if [[ $SRS_OSX != YES && $SRS_CYGWIN64 != YES && $SRS_RTC == YES && $SRS_FFMPEG_FIT == YES ]]; then
SrsLinkOptions="${SrsLinkOptions} -lrt";
fi
@ -222,6 +224,11 @@ if [[ $SRS_SANITIZER == YES && $OS_IS_X86_64 == YES ]]; then
fi
fi
# For FFMPEG/RTC on windows.
if [[ $SRS_CYGWIN64 == YES && $SRS_FFMPEG_FIT == YES ]]; then
SrsLinkOptions="${SrsLinkOptions} -lbcrypt";
fi
#####################################################################################
# Modules, compile each module, then link to binary
#
@ -555,8 +562,8 @@ clean_st:
st:
@rm -f ${SRS_OBJS}/srs srs_utest
@\$(MAKE)\$(JOBS) -C ${SRS_OBJS}/${SRS_PLATFORM}/st-srs clean)
@env EXTRA_CFLAGS="${_ST_EXTRA_CFLAGS}" \$(MAKE)\$(JOBS) -C ${SRS_OBJS}/${SRS_PLATFORM}/st-srs ${_ST_MAKE_ARGS} CC=\$(GCC) AR=\$(AR) LD=\$(LINK) RANDLIB=\$(RANDLIB))
@\$(MAKE)\$(JOBS) -C ${SRS_OBJS}/${SRS_PLATFORM}/st-srs clean
@env EXTRA_CFLAGS="${_ST_EXTRA_CFLAGS}" \$(MAKE)\$(JOBS) -C ${SRS_OBJS}/${SRS_PLATFORM}/st-srs ${_ST_MAKE_ARGS} CC=\$(GCC) AR=\$(AR) LD=\$(LINK) RANDLIB=\$(RANDLIB)
@echo "Please rebuild srs by: make"
ffmpeg: