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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
+14
-15
CMakeLists.txt
CMakeLists.txt
+14
-15
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
...
...
@@ -355,9 +354,9 @@ set(PROTO_FILES idl_options.proto
brpc/streaming_rpc_meta.proto
)
file
(
MAKE_DIRECTORY
${
CMAKE_BINARY_DIR
}
/output/include/brpc
)
set
(
PROTOC_FLAGS
${
PROTOC_FLAGS
}
-I
${
PROTOBUF_INCLUDE_DIR
}
)
compile_proto
(
PROTO_HDRS PROTO_SRCS
${
CMAKE_BINARY_DIR
}
compile_proto
(
PROTO_HDRS PROTO_SRCS
${
CMAKE_BINARY_DIR
}
${
CMAKE_BINARY_DIR
}
/output/include
${
CMAKE_SOURCE_DIR
}
/src
${
CMAKE_SOURCE_DIR
}
/src
"
${
PROTO_FILES
}
"
)
add_library
(
PROTO_LIB OBJECT
${
PROTO_SRCS
}
${
PROTO_HDRS
}
)
...
...
@@ -377,7 +376,7 @@ add_subdirectory(tools)
file
(
COPY
${
CMAKE_CURRENT_BINARY_DIR
}
/brpc/
DESTINATION
${
CMAKE_CURRENT_BINARY_DIR
}
/output/include/brpc/
FILES_MATCHING
FILES_MATCHING
PATTERN
"*.h"
PATTERN
"*.hpp"
)
...
...
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