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
5a170fe5
Commit
5a170fe5
authored
Jan 02, 2018
by
zhujiashun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add flag EXAMPLE_LINK_SO
parent
5ee9c85b
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
192 additions
and
77 deletions
+192
-77
CMakeLists.txt
CMakeLists.txt
+13
-0
CMakeLists.txt
example/asynchronous_echo_c++/CMakeLists.txt
+8
-3
CMakeLists.txt
example/backup_request_c++/CMakeLists.txt
+8
-3
CMakeLists.txt
example/cancel_c++/CMakeLists.txt
+8
-3
CMakeLists.txt
example/cascade_echo_c++/CMakeLists.txt
+8
-3
CMakeLists.txt
example/dynamic_partition_echo_c++/CMakeLists.txt
+8
-3
CMakeLists.txt
example/echo_c++/CMakeLists.txt
+10
-3
CMakeLists.txt
example/echo_c++_hulu_pbrpc/CMakeLists.txt
+8
-3
CMakeLists.txt
example/echo_c++_sofa_pbrpc/CMakeLists.txt
+8
-3
CMakeLists.txt
example/echo_c++_ubrpc_compack/CMakeLists.txt
+8
-3
CMakeLists.txt
example/http_c++/CMakeLists.txt
+10
-5
CMakeLists.txt
example/memcache_c++/CMakeLists.txt
+6
-1
CMakeLists.txt
example/multi_threaded_echo_c++/CMakeLists.txt
+8
-3
CMakeLists.txt
example/multi_threaded_echo_fns_c++/CMakeLists.txt
+8
-3
CMakeLists.txt
example/multi_threaded_mcpack_c++/CMakeLists.txt
+8
-3
CMakeLists.txt
example/nshead_extension_c++/CMakeLists.txt
+8
-3
CMakeLists.txt
example/nshead_pb_extension_c++/CMakeLists.txt
+8
-3
CMakeLists.txt
example/parallel_echo_c++/CMakeLists.txt
+8
-3
CMakeLists.txt
example/partition_echo_c++/CMakeLists.txt
+8
-3
CMakeLists.txt
example/redis_c++/CMakeLists.txt
+8
-3
CMakeLists.txt
example/selective_echo_c++/CMakeLists.txt
+8
-3
CMakeLists.txt
example/session_data_and_thread_local/CMakeLists.txt
+8
-3
CMakeLists.txt
example/streaming_echo_c++/CMakeLists.txt
+8
-3
CMakeLists.txt
src/CMakeLists.txt
+1
-11
No files found.
CMakeLists.txt
View file @
5a170fe5
...
...
@@ -19,6 +19,7 @@ option(WITH_GLOG "With glog" OFF)
option
(
BRPC_DEBUG
"With debug symbol"
ON
)
option
(
BUILD_EXAMPLE
"Whether building examples"
ON
)
option
(
BUILD_UNIT_TESTS
"Whether building unit tests"
OFF
)
option
(
EXAMPLE_LINK_SO
"Whether examples are linked dynamically"
OFF
)
if
(
WITH_GLOG
)
set
(
WITH_GLOG_VAL
"1"
)
...
...
@@ -91,6 +92,18 @@ include_directories(
${
LEVELDB_HEADER
}
)
set
(
DYNAMIC_LIB
${
GFLAGS_LIBRARY
}
${
PROTOBUF_LIBRARIES
}
${
LEVELDB_LIB
}
${
PROTOC_LIB
}
rt
ssl
crypto
dl
z
)
# for *.so
set
(
CMAKE_LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/lib
)
# for *.a
...
...
example/asynchronous_echo_c++/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -3,7 +3,12 @@ get_filename_component(HEADER_DIR ${PROTO_HEADER} DIRECTORY)
include_directories
(
${
HEADER_DIR
}
)
add_executable
(
asynchronous_echo_client client.cpp
${
PROTO_SRC
}
)
target_link_libraries
(
asynchronous_echo_client brpc
)
add_executable
(
asynchronous_echo_server server.cpp
${
PROTO_SRC
}
)
target_link_libraries
(
asynchronous_echo_server brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
asynchronous_echo_client brpc
)
target_link_libraries
(
asynchronous_echo_server brpc
)
else
()
target_link_libraries
(
asynchronous_echo_client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
asynchronous_echo_server brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/backup_request_c++/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -3,7 +3,12 @@ get_filename_component(HEADER_DIR ${PROTO_HEADER} DIRECTORY)
include_directories
(
${
HEADER_DIR
}
)
add_executable
(
backup_request_client client.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
backup_request_client brpc
)
add_executable
(
backup_request_server server.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
backup_request_server brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
backup_request_client brpc
)
target_link_libraries
(
backup_request_server brpc
)
else
()
target_link_libraries
(
backup_request_client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
backup_request_server brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/cancel_c++/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -3,7 +3,12 @@ get_filename_component(HEADER_DIR ${PROTO_HEADER} DIRECTORY)
include_directories
(
${
HEADER_DIR
}
)
add_executable
(
cancel_client client.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
cancel_client brpc
)
add_executable
(
cancel_server server.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
cancel_server brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
cancel_client brpc
)
target_link_libraries
(
cancel_server brpc
)
else
()
target_link_libraries
(
cancel_client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
cancel_server brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/cascade_echo_c++/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -3,7 +3,12 @@ get_filename_component(HEADER_DIR ${PROTO_HEADER} DIRECTORY)
include_directories
(
${
HEADER_DIR
}
)
add_executable
(
cascade_echo_client client.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
cascade_echo_client brpc
)
add_executable
(
cascade_echo_server server.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
cascade_echo_server brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
cascade_echo_client brpc
)
target_link_libraries
(
cascade_echo_server brpc
)
else
()
target_link_libraries
(
cascade_echo_client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
cascade_echo_server brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/dynamic_partition_echo_c++/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -3,7 +3,12 @@ get_filename_component(HEADER_DIR ${PROTO_HEADER} DIRECTORY)
include_directories
(
${
HEADER_DIR
}
)
add_executable
(
dynamic_partition_echo_client client.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
dynamic_partition_echo_client brpc
)
add_executable
(
dynamic_partition_echo_server server.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
dynamic_partition_echo_server brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
dynamic_partition_echo_client brpc
)
target_link_libraries
(
dynamic_partition_echo_server brpc
)
else
()
target_link_libraries
(
dynamic_partition_echo_client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
dynamic_partition_echo_server brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/echo_c++/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -3,7 +3,14 @@ get_filename_component(HEADER_DIR ${PROTO_HEADER} DIRECTORY)
include_directories
(
${
HEADER_DIR
}
)
add_executable
(
echo_client client.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
echo_client brpc
)
add_executable
(
echo_server server.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
echo_server brpc
)
if
(
EXAMPLE_LINK_SO
)
message
(
"EXAMPLE_LINK_SO"
)
target_link_libraries
(
echo_client brpc
)
target_link_libraries
(
echo_server brpc
)
else
()
message
(
"not EXAMPLE_LINK_SO"
)
target_link_libraries
(
echo_client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
echo_server brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/echo_c++_hulu_pbrpc/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -3,7 +3,12 @@ get_filename_component(HEADER_DIR ${PROTO_HEADER} DIRECTORY)
include_directories
(
${
HEADER_DIR
}
)
add_executable
(
echo_hulu_pbrpc_client client.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
echo_hulu_pbrpc_client brpc
)
add_executable
(
echo_hulu_pbrpc_server server.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
echo_hulu_pbrpc_server brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
echo_hulu_pbrpc_client brpc
)
target_link_libraries
(
echo_hulu_pbrpc_server brpc
)
else
()
target_link_libraries
(
echo_hulu_pbrpc_client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
echo_hulu_pbrpc_server brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/echo_c++_sofa_pbrpc/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -3,7 +3,12 @@ get_filename_component(HEADER_DIR ${PROTO_HEADER} DIRECTORY)
include_directories
(
${
HEADER_DIR
}
)
add_executable
(
echo_sofa_pbrpc_client client.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
echo_sofa_pbrpc_client brpc
)
add_executable
(
echo_sofa_pbrpc_server server.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
echo_sofa_pbrpc_server brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
echo_sofa_pbrpc_client brpc
)
target_link_libraries
(
echo_sofa_pbrpc_server brpc
)
else
()
target_link_libraries
(
echo_sofa_pbrpc_client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
echo_sofa_pbrpc_server brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/echo_c++_ubrpc_compack/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -5,8 +5,13 @@ execute_process(
)
add_executable
(
echo_ubrpc_compack_client client.cpp
${
CMAKE_CURRENT_BINARY_DIR
}
/echo.pb.cc
)
target_link_libraries
(
echo_ubrpc_compack_client brpc
)
add_executable
(
echo_ubrpc_compack_server server.cpp
${
CMAKE_CURRENT_BINARY_DIR
}
/echo.pb.cc
)
target_link_libraries
(
echo_ubrpc_compack_server brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
echo_ubrpc_compack_client brpc
)
target_link_libraries
(
echo_ubrpc_compack_server brpc
)
else
()
target_link_libraries
(
echo_ubrpc_compack_client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
echo_ubrpc_compack_server brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/http_c++/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -3,10 +3,15 @@ get_filename_component(HEADER_DIR ${PROTO_HEADER} DIRECTORY)
include_directories
(
${
HEADER_DIR
}
)
add_executable
(
http_client http_client.cpp
)
target_link_libraries
(
http_client brpc
)
add_executable
(
http_server http_server.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
http_server brpc
)
add_executable
(
benchmark_http benchmark_http.cpp
)
target_link_libraries
(
benchmark_http brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
http_server brpc
)
target_link_libraries
(
http_client brpc
)
target_link_libraries
(
benchmark_http brpc
)
else
()
target_link_libraries
(
http_server brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
http_client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
benchmark_http brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/memcache_c++/CMakeLists.txt
View file @
5a170fe5
add_executable
(
memcache_client client.cpp
)
target_link_libraries
(
memcache_client brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
memcache_client brpc
)
else
()
target_link_libraries
(
memcache_client brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/multi_threaded_echo_c++/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -3,7 +3,12 @@ get_filename_component(HEADER_DIR ${PROTO_HEADER} DIRECTORY)
include_directories
(
${
HEADER_DIR
}
)
add_executable
(
multi_threaded_echo_client client.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
multi_threaded_echo_client brpc
)
add_executable
(
multi_threaded_echo_server server.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
multi_threaded_echo_server brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
multi_threaded_echo_client brpc
)
target_link_libraries
(
multi_threaded_echo_server brpc
)
else
()
target_link_libraries
(
multi_threaded_echo_client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
multi_threaded_echo_server brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/multi_threaded_echo_fns_c++/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -3,7 +3,12 @@ get_filename_component(HEADER_DIR ${PROTO_HEADER} DIRECTORY)
include_directories
(
${
HEADER_DIR
}
)
add_executable
(
multi_threaded_echo_fns_client client.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
multi_threaded_echo_fns_client brpc
)
add_executable
(
multi_threaded_echo_fns_server server.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
multi_threaded_echo_fns_server brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
multi_threaded_echo_fns_client brpc
)
target_link_libraries
(
multi_threaded_echo_fns_server brpc
)
else
()
target_link_libraries
(
multi_threaded_echo_fns_client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
multi_threaded_echo_fns_server brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/multi_threaded_mcpack_c++/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -5,7 +5,12 @@ execute_process(
)
add_executable
(
multi_threaded_mcpack_client client.cpp
${
CMAKE_CURRENT_BINARY_DIR
}
/echo.pb.cc
)
target_link_libraries
(
multi_threaded_mcpack_client brpc
)
add_executable
(
multi_threaded_mcpack_server server.cpp
${
CMAKE_CURRENT_BINARY_DIR
}
/echo.pb.cc
)
target_link_libraries
(
multi_threaded_mcpack_server brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
multi_threaded_mcpack_client brpc
)
target_link_libraries
(
multi_threaded_mcpack_server brpc
)
else
()
target_link_libraries
(
multi_threaded_mcpack_client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
multi_threaded_mcpack_server brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/nshead_extension_c++/CMakeLists.txt
View file @
5a170fe5
add_executable
(
nshead_extension_client client.cpp
)
target_link_libraries
(
nshead_extension_client brpc
)
add_executable
(
nshead_extension_server server.cpp
)
target_link_libraries
(
nshead_extension_server brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
nshead_extension_client brpc
)
target_link_libraries
(
nshead_extension_server brpc
)
else
()
target_link_libraries
(
nshead_extension_client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
nshead_extension_server brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/nshead_pb_extension_c++/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -3,7 +3,12 @@ get_filename_component(HEADER_DIR ${PROTO_HEADER} DIRECTORY)
include_directories
(
${
HEADER_DIR
}
)
add_executable
(
nshead_pb_extension_client client.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
nshead_pb_extension_client brpc
)
add_executable
(
nshead_pb_extension_server server.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
nshead_pb_extension_server brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
nshead_pb_extension_client brpc
)
target_link_libraries
(
nshead_pb_extension_server brpc
)
else
()
target_link_libraries
(
nshead_pb_extension_client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
nshead_pb_extension_server brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/parallel_echo_c++/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -3,7 +3,12 @@ get_filename_component(HEADER_DIR ${PROTO_HEADER} DIRECTORY)
include_directories
(
${
HEADER_DIR
}
)
add_executable
(
parallel_echo_client client.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
parallel_echo_client brpc
)
add_executable
(
parallel_echo_server server.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
parallel_echo_server brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
parallel_echo_client brpc
)
target_link_libraries
(
parallel_echo_server brpc
)
else
()
target_link_libraries
(
parallel_echo_client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
parallel_echo_server brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/partition_echo_c++/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -3,7 +3,12 @@ get_filename_component(HEADER_DIR ${PROTO_HEADER} DIRECTORY)
include_directories
(
${
HEADER_DIR
}
)
add_executable
(
client client.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
client brpc
)
add_executable
(
server server.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
server brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
client brpc
)
target_link_libraries
(
server brpc
)
else
()
target_link_libraries
(
client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
server brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/redis_c++/CMakeLists.txt
View file @
5a170fe5
add_executable
(
redis_cli redis_cli.cpp
)
target_link_libraries
(
redis_cli brpc
)
add_executable
(
redis_press redis_press.cpp
)
target_link_libraries
(
redis_press brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
redis_cli brpc
)
target_link_libraries
(
redis_press brpc
)
else
()
target_link_libraries
(
redis_cli brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
redis_press brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/selective_echo_c++/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -3,7 +3,12 @@ get_filename_component(HEADER_DIR ${PROTO_HEADER} DIRECTORY)
include_directories
(
${
HEADER_DIR
}
)
add_executable
(
selective_echo_client client.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
selective_echo_client brpc
)
add_executable
(
selective_echo_server server.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
selective_echo_server brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
selective_echo_client brpc
)
target_link_libraries
(
selective_echo_server brpc
)
else
()
target_link_libraries
(
selective_echo_client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
selective_echo_server brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/session_data_and_thread_local/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -3,7 +3,12 @@ get_filename_component(HEADER_DIR ${PROTO_HEADER} DIRECTORY)
include_directories
(
${
HEADER_DIR
}
)
add_executable
(
session_data_and_thread_local_client client.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
session_data_and_thread_local_client brpc
)
add_executable
(
session_data_and_thread_local_server server.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
session_data_and_thread_local_server brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
session_data_and_thread_local_client brpc
)
target_link_libraries
(
session_data_and_thread_local_server brpc
)
else
()
target_link_libraries
(
session_data_and_thread_local_client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
session_data_and_thread_local_server brpc_static
${
DYNAMIC_LIB
}
)
endif
()
example/streaming_echo_c++/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -3,7 +3,12 @@ get_filename_component(HEADER_DIR ${PROTO_HEADER} DIRECTORY)
include_directories
(
${
HEADER_DIR
}
)
add_executable
(
streaming_echo_client client.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
streaming_echo_client brpc
)
add_executable
(
streaming_echo_server server.cpp
${
PROTO_SRC
}
${
PROTO_HEADER
}
)
target_link_libraries
(
streaming_echo_server brpc
)
if
(
EXAMPLE_LINK_SO
)
target_link_libraries
(
streaming_echo_client brpc
)
target_link_libraries
(
streaming_echo_server brpc
)
else
()
target_link_libraries
(
streaming_echo_client brpc_static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
streaming_echo_server brpc_static
${
DYNAMIC_LIB
}
)
endif
()
src/CMakeLists.txt
View file @
5a170fe5
...
...
@@ -193,17 +193,7 @@ set_property(TARGET ${BUTIL_LIB} PROPERTY POSITION_INDEPENDENT_CODE 1)
add_library
(
brpc SHARED $<TARGET_OBJECTS:OBJ_LIB> $<TARGET_OBJECTS:BUTIL_LIB>
)
add_library
(
brpc_static STATIC $<TARGET_OBJECTS:OBJ_LIB> $<TARGET_OBJECTS:BUTIL_LIB>
)
target_link_libraries
(
brpc
${
GFLAGS_LIBRARY
}
${
PROTOBUF_LIBRARIES
}
${
LEVELDB_LIB
}
${
PROTOC_LIB
}
rt
ssl
crypto
dl
z
)
target_link_libraries
(
brpc
${
DYNAMIC_LIB
}
)
if
(
WITH_GLOG
)
target_link_libraries
(
brpc
${
GLOG_LIB
}
)
...
...
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