mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +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"
|
echo "OSX detected, install tools if needed"
|
||||||
|
|
||||||
brew --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
brew --version >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||||
echo "install brew"
|
echo "Please install brew at https://brew.sh/"
|
||||||
echo "ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\""
|
exit $ret
|
||||||
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"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
gcc --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
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.
|
# We should always configure SRS for switching between branches.
|
||||||
IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
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 ()
|
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 ()
|
ENDIF ()
|
||||||
|
if(NOT ret EQUAL 0)
|
||||||
|
message(FATAL_ERROR "FAILED: ${ret}")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(DEPS_LIBS ${SRS_DIR}/objs/st/libst.a
|
set(DEPS_LIBS ${SRS_DIR}/objs/st/libst.a
|
||||||
${SRS_DIR}/objs/openssl/lib/libssl.a
|
${SRS_DIR}/objs/openssl/lib/libssl.a
|
||||||
|
|
Loading…
Reference in a new issue