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
9a08ce55
Commit
9a08ce55
authored
Mar 22, 2018
by
Jason S Zang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add cmake pkgconfig generation for easier usage from other projects
parent
86827305
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
CMakeLists.txt
CMakeLists.txt
+8
-0
brpc.pc.in
cmake/brpc.pc.in
+11
-0
No files found.
CMakeLists.txt
View file @
9a08ce55
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
brpc C CXX
)
set
(
BRPC_VERSION 0.9.0
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"GNU"
)
# require at least gcc 4.8
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8
)
...
...
@@ -131,8 +133,10 @@ set(DYNAMIC_LIB
dl
z
)
set
(
BRPC_PRIVATE_LIBS
"-lgflags -lprotobuf -lleveldb -lprotoc -lrt -lssl -lcrypto -ldl -lz"
)
if
(
BRPC_WITH_GLOG
)
set
(
DYNAMIC_LIB
${
DYNAMIC_LIB
}
${
GLOG_LIB
}
)
set
(
BRPC_PRIVATE_LIBS
"
${
BRPC_PRIVATE_LIBS
}
-lglog"
)
endif
()
# for *.so
...
...
@@ -344,3 +348,7 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/output/include/
PATTERN
"*.h"
PATTERN
"*.hpp"
)
# Install pkgconfig
configure_file
(
cmake/brpc.pc.in
${
CMAKE_BINARY_DIR
}
/brpc.pc @ONLY
)
install
(
FILES
${
CMAKE_BINARY_DIR
}
/brpc.pc DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
/pkgconfig
)
cmake/brpc.pc.in
0 → 100644
View file @
9a08ce55
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
Name: brpc
Description: A industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances(not counting clients) and thousands kinds of services, called "baidu-rpc" inside Baidu.
Version: @BRPC_VERSION@
Cflags: -I${includedir}
Libs: -L${libdir}/ -lbrpc
Libs.private: @BRPC_PRIVATE_LIBS@
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