Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
3a03e35c
Commit
3a03e35c
authored
Jun 07, 2018
by
zhujiashun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
search openssl in brew installed path under macos
parent
9e227c0a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
CMakeLists.txt
CMakeLists.txt
+11
-12
No files found.
CMakeLists.txt
View file @
3a03e35c
...
...
@@ -133,22 +133,19 @@ if(NOT PROTOC_LIB)
message
(
FATAL_ERROR
"Fail to find protoc lib"
)
endif
()
find_path
(
SSL_INCLUDE_PATH NAMES openssl/ssl.h
)
find_library
(
SSL_LIB NAMES ssl
)
if
((
NOT SSL_INCLUDE_PATH
)
OR
(
NOT SSL_LIB
))
message
(
FATAL_ERROR
"Fail to find ssl"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
set
(
OPENSSL_ROOT_DIR
"/usr/local/opt/openssl"
# Homebrew installed OpenSSL
)
endif
()
find_library
(
CRYPTO_LIB NAMES crypto
)
if
(
NOT CRYPTO_LIB
)
message
(
FATAL_ERROR
"Fail to find crypto"
)
endif
()
include
(
FindOpenSSL
)
include_directories
(
${
GFLAGS_INCLUDE_PATH
}
${
PROTOBUF_INCLUDE_DIRS
}
${
LEVELDB_INCLUDE_PATH
}
${
SSL_INCLUDE_PATH
}
${
OPENSSL_INCLUDE_DIR
}
)
set
(
DYNAMIC_LIB
...
...
@@ -158,12 +155,13 @@ set(DYNAMIC_LIB
${
PROTOC_LIB
}
${
CMAKE_THREAD_LIBS_INIT
}
${
THRIFT_LIB
}
${
SSL_LIB
}
${
CRYPTO_LIB
}
${
OPENSSL_LIBRARIES
}
${
OPENSSL_CRYPTO_LIBRARY
}
dl
z
)
set
(
BRPC_PRIVATE_LIBS
"-lgflags -lprotobuf -lleveldb -lprotoc -lrt -lssl -lcrypto -ldl -lz"
)
set
(
BRPC_PRIVATE_LIBS
"-lgflags -lprotobuf -lleveldb -lprotoc -lssl -lcrypto -ldl -lz"
)
if
(
BRPC_WITH_GLOG
)
set
(
DYNAMIC_LIB
${
DYNAMIC_LIB
}
${
GLOG_LIB
}
)
set
(
BRPC_PRIVATE_LIBS
"
${
BRPC_PRIVATE_LIBS
}
-lglog"
)
...
...
@@ -171,6 +169,7 @@ endif()
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Linux"
)
set
(
DYNAMIC_LIB
${
DYNAMIC_LIB
}
rt
)
set
(
BRPC_PRIVATE_LIBS
"
${
BRPC_PRIVATE_LIBS
}
-lrt"
)
elseif
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
set
(
DYNAMIC_LIB
${
DYNAMIC_LIB
}
pthread
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment