mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 03:41:55 +00:00
SRT: Fix cmake bug, quit if error.
This commit is contained in:
parent
b566182f0b
commit
d88fd12c26
2 changed files with 12 additions and 7 deletions
|
@ -253,11 +253,9 @@ function OSX_prepare()
|
|||
|
||||
echo "OSX detected, install tools if needed"
|
||||
|
||||
brew --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "install brew"
|
||||
echo "ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\""
|
||||
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "install brew success"
|
||||
brew --version >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "Please install brew at https://brew.sh/"
|
||||
exit $ret
|
||||
fi
|
||||
|
||||
gcc --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
|
|
|
@ -26,10 +26,17 @@ ProcessorCount(JOBS)
|
|||
|
||||
# We should always configure SRS for switching between branches.
|
||||
IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
EXEC_PROGRAM("cd ${SRS_DIR} && ./configure --osx --srt=on --utest=on --jobs=${JOBS}")
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ./configure --osx --srt=on --utest=on --jobs=${JOBS}
|
||||
WORKING_DIRECTORY ${SRS_DIR} RESULT_VARIABLE ret)
|
||||
ELSE ()
|
||||
EXEC_PROGRAM("cd ${SRS_DIR} && ./configure --srt=on --utest=on --jobs=${JOBS}")
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ./configure --srt=on --utest=on --jobs=${JOBS}
|
||||
WORKING_DIRECTORY ${SRS_DIR} RESULT_VARIABLE ret)
|
||||
ENDIF ()
|
||||
if(NOT ret EQUAL 0)
|
||||
message(FATAL_ERROR "FAILED: ${ret}")
|
||||
endif()
|
||||
|
||||
set(DEPS_LIBS ${SRS_DIR}/objs/st/libst.a
|
||||
${SRS_DIR}/objs/openssl/lib/libssl.a
|
||||
|
|
Loading…
Reference in a new issue