Commit c32b4de1 authored by wenweihu86's avatar wenweihu86

update lib search path to /usr/local for mac os env

parent 94fd1c80
......@@ -141,12 +141,7 @@ OPENSSL_LIB=$(find_dir_of_lib ssl)
# Inconvenient to check these headers in baidu-internal
#PTHREAD_HDR=$(find_dir_of_header_or_die pthread.h)
if [ "$SYSTEM" = "Darwin" ]; then
OPENSSL_HDR="/usr/local/Cellar/openssl\@1.1/1.1.1b/include"
OPENSSL_LIB="/usr/local/Cellar/openssl\@1.1/1.1.1b/lib"
else
OPENSSL_HDR=$(find_dir_of_header_or_die openssl/ssl.h)
fi
OPENSSL_HDR=$(find_dir_of_header_or_die openssl/ssl.h)
if [ $WITH_MESALINK != 0 ]; then
MESALINK_HDR=$(find_dir_of_header_or_die mesalink/openssl/ssl.h)
......
......@@ -40,7 +40,7 @@ sudo apt-get install libgoogle-perftools-dev
If you need to run tests, install and compile libgtest-dev (which is not compiled yet):
```shell
sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo cmake . && sudo make && sudo mv lib/libgtest* /usr/lib/ && cd -
sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo cmake . && sudo make && sudo mv libgtest* /usr/lib/ && cd -
```
The directory of gtest source code may be changed, try `/usr/src/googletest/googletest` if `/usr/src/gtest` is not there.
......@@ -257,18 +257,12 @@ Note: In the same running environment, the performance of the current Mac versio
Install common deps:
```shell
brew install openssl@1.1 git gnu-getopt coreutils
brew install openssl git gnu-getopt coreutils
```
Install [gflags](https://github.com/gflags/gflags), [leveldb](https://github.com/google/leveldb):
```shell
brew install gflags leveldb
```
Install [protobuf](https://github.com/google/protobuf):
Install [gflags](https://github.com/gflags/gflags), [protobuf](https://github.com/google/protobuf), [leveldb](https://github.com/google/leveldb):
```shell
brew install protobuf@3.1
brew link --force --overwrite protobuf@3.1
brew install gflags protobuf leveldb
```
If you need to enable cpu/heap profilers in examples:
......@@ -278,13 +272,13 @@ brew install gperftools
If you need to run tests, install and compile googletest (which is not compiled yet):
```shell
git clone https://github.com/google/googletest && cd googletest/googletest && mkdir bld && cd bld && cmake -DCMAKE_CXX_FLAGS="-std=c++11" .. && make && sudo mv lib/libgtest* /usr/lib/ && cd -
git clone https://github.com/google/googletest && cd googletest/googletest && mkdir bld && cd bld && cmake -DCMAKE_CXX_FLAGS="-std=c++11" .. && make && sudo mv libgtest* /usr/lib/ && cd -
```
### Compile brpc with config_brpc.sh
git clone brpc, cd into the repo and run
```shell
$ sh config_brpc.sh --headers=/usr/local/include --libs=/usr/local/lib --cc=clang --cxx=clang++
$ sh config_brpc.sh --headers=/usr/local --libs=/usr/local --cc=clang --cxx=clang++
$ make
```
To not link debugging symbols, add `--nodebugsymbols` and compiled binaries will be much smaller.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment