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
faea9470
Commit
faea9470
authored
5 years ago
by
zhujiashun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace_include_with_find_package: fix example under mac
parent
bcb87a65
master
0.9.8-rc01
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
CMakeLists.txt
example/echo_c++/CMakeLists.txt
+8
-10
No files found.
example/echo_c++/CMakeLists.txt
View file @
faea9470
...
...
@@ -102,15 +102,13 @@ if ((NOT LEVELDB_INCLUDE_PATH) OR (NOT LEVELDB_LIB))
endif
()
include_directories
(
${
LEVELDB_INCLUDE_PATH
}
)
find_library
(
SSL_LIB NAMES ssl
)
if
(
NOT SSL_LIB
)
message
(
FATAL_ERROR
"Fail to find ssl"
)
endif
()
find_library
(
CRYPTO_LIB NAMES crypto
)
if
(
NOT CRYPTO_LIB
)
message
(
FATAL_ERROR
"Fail to find crypto"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
set
(
OPENSSL_ROOT_DIR
"/usr/local/opt/openssl"
# Homebrew installed OpenSSL
)
endif
()
include_directories
(
${
OPENSSL_INCLUDE_DIR
}
)
find_package
(
OpenSSL
)
add_executable
(
echo_client client.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
add_executable
(
echo_server server.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
...
...
@@ -120,8 +118,8 @@ set(DYNAMIC_LIB
${
GFLAGS_LIBRARY
}
${
PROTOBUF_LIBRARIES
}
${
LEVELDB_LIB
}
${
SSL_LIB
}
${
CRYPTO_LIB
}
${
OPENSSL_CRYPTO_LIBRARY
}
${
OPENSSL_SSL_LIBRARY
}
${
THRIFT_LIB
}
${
THRIFTNB_LIB
}
dl
...
...
This diff is collapsed.
Click to expand it.
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