Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify CMake build #14885

Merged
merged 2 commits into from
Apr 3, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 1 addition & 43 deletions examples/android/helloworld/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,6 @@ file(MAKE_DIRECTORY ${GRPC_BUILD_DIR})

add_subdirectory(${GRPC_SRC_DIR} ${GRPC_BUILD_DIR})

include_directories(${GRPC_SRC_DIR}/include)

add_library(libgrpc STATIC IMPORTED)
set_target_properties(libgrpc PROPERTIES IMPORTED_LOCATION
${GRPC_BUILD_DIR}/libgrpc.a)

add_library(libgrpc++ STATIC IMPORTED)
set_target_properties(libgrpc++ PROPERTIES IMPORTED_LOCATION
${GRPC_BUILD_DIR}/libgrpc++.a)

add_library(libgpr STATIC IMPORTED)
set_target_properties(libgpr PROPERTIES IMPORTED_LOCATION
${GRPC_BUILD_DIR}/libgpr.a)

add_library(libaddress_sorting STATIC IMPORTED)
set_target_properties(libaddress_sorting PROPERTIES IMPORTED_LOCATION
${GRPC_BUILD_DIR}/libaddress_sorting.a)

add_library(libcares STATIC IMPORTED)
set_target_properties(libcares PROPERTIES IMPORTED_LOCATION
${GRPC_BUILD_DIR}/third_party/cares/cares/lib/libcares.a)

add_library(libzlib STATIC IMPORTED)
set_target_properties(libzlib PROPERTIES IMPORTED_LOCATION
${GRPC_BUILD_DIR}/third_party/zlib/libz.a)

add_library(libcrypto STATIC IMPORTED)
set_target_properties(libcrypto PROPERTIES IMPORTED_LOCATION
${GRPC_BUILD_DIR}/third_party/boringssl/crypto/libcrypto.a)

add_library(libssl STATIC IMPORTED)
set_target_properties(libssl PROPERTIES IMPORTED_LOCATION
${GRPC_BUILD_DIR}/third_party/boringssl/ssl/libssl.a)

set(GRPC_PROTO_GENS_DIR ${CMAKE_BINARY_DIR}/gens)
file(MAKE_DIRECTORY ${GRPC_PROTO_GENS_DIR})
include_directories(${GRPC_PROTO_GENS_DIR})
Expand Down Expand Up @@ -100,8 +66,8 @@ add_library(helloworld_proto_lib
SHARED ${HELLOWORLD_PROTO_HDRS} ${HELLOWORLD_PROTO_SRCS})

target_link_libraries(helloworld_proto_lib
grpc++
libprotobuf
libgrpc++
android
log)

Expand All @@ -115,14 +81,6 @@ target_include_directories(grpc-helloworld
PRIVATE ${HELLOWORLD_PROTO_HEADERS})

target_link_libraries(grpc-helloworld
libgrpc++
libgrpc
libaddress_sorting
libzlib
libcares
libssl
libcrypto
helloworld_proto_lib
libgpr
android
${log-lib})