pull/11582/head
Jan Tattermusch 8 years ago
parent f691556db4
commit dca8d637c0
  1. 258
      CMakeLists.txt

@ -30,6 +30,11 @@ set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/") set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/")
project(${PACKAGE_NAME} C CXX) project(${PACKAGE_NAME} C CXX)
set(gRPC_INSTALL_BINDIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
set(gRPC_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
set(gRPC_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers")
set(gRPC_INSTALL_CMAKEDIR "${CMAKE_INSTALL_PREFIX}/lib/cmake/${PACKAGE_NAME}" CACHE PATH "Installation directory for cmake config files")
# Options # Options
option(gRPC_BUILD_TESTS "Build tests" OFF) option(gRPC_BUILD_TESTS "Build tests" OFF)
@ -290,11 +295,6 @@ if(WIN32 AND MSVC)
set(_gRPC_BASELIB_LIBRARIES wsock32 ws2_32) set(_gRPC_BASELIB_LIBRARIES wsock32 ws2_32)
endif() endif()
include(GNUInstallDirs)
if(NOT DEFINED CMAKE_INSTALL_CMAKEDIR)
set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/gRPC")
endif()
# Create directory for generated .proto files # Create directory for generated .proto files
set(_gRPC_PROTO_GENS_DIR ${CMAKE_BINARY_DIR}/gens) set(_gRPC_PROTO_GENS_DIR ${CMAKE_BINARY_DIR}/gens)
file(MAKE_DIRECTORY ${_gRPC_PROTO_GENS_DIR}) file(MAKE_DIRECTORY ${_gRPC_PROTO_GENS_DIR})
@ -809,7 +809,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gpr.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gpr.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -876,16 +876,16 @@ foreach(_hdr
string(REPLACE "include/" "" _path ${_hdr}) string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH) get_filename_component(_path ${_path} PATH)
install(FILES ${_hdr} install(FILES ${_hdr}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}" DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
) )
endforeach() endforeach()
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS gpr EXPORT gRPCTargets install(TARGETS gpr EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -901,7 +901,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gpr_test_util.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gpr_test_util.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -1188,7 +1188,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -1255,16 +1255,16 @@ foreach(_hdr
string(REPLACE "include/" "" _path ${_hdr}) string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH) get_filename_component(_path ${_path} PATH)
install(FILES ${_hdr} install(FILES ${_hdr}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}" DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
) )
endforeach() endforeach()
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc EXPORT gRPCTargets install(TARGETS grpc EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -1487,7 +1487,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_cronet.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_cronet.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -1554,16 +1554,16 @@ foreach(_hdr
string(REPLACE "include/" "" _path ${_hdr}) string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH) get_filename_component(_path ${_path} PATH)
install(FILES ${_hdr} install(FILES ${_hdr}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}" DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
) )
endforeach() endforeach()
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc_cronet EXPORT gRPCTargets install(TARGETS grpc_cronet EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -1723,7 +1723,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_test_util.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_test_util.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -1786,7 +1786,7 @@ foreach(_hdr
string(REPLACE "include/" "" _path ${_hdr}) string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH) get_filename_component(_path ${_path} PATH)
install(FILES ${_hdr} install(FILES ${_hdr}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}" DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
) )
endforeach() endforeach()
@ -1817,7 +1817,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_test_util_unsecure.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_test_util_unsecure.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -2078,7 +2078,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_unsecure.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_unsecure.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -2143,16 +2143,16 @@ foreach(_hdr
string(REPLACE "include/" "" _path ${_hdr}) string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH) get_filename_component(_path ${_path} PATH)
install(FILES ${_hdr} install(FILES ${_hdr}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}" DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
) )
endforeach() endforeach()
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc_unsecure EXPORT gRPCTargets install(TARGETS grpc_unsecure EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -2168,7 +2168,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/reconnect_server.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/reconnect_server.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -2212,7 +2212,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/test_tcp_server.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/test_tcp_server.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -2298,7 +2298,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -2428,16 +2428,16 @@ foreach(_hdr
string(REPLACE "include/" "" _path ${_hdr}) string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH) get_filename_component(_path ${_path} PATH)
install(FILES ${_hdr} install(FILES ${_hdr}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}" DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
) )
endforeach() endforeach()
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc++ EXPORT gRPCTargets install(TARGETS grpc++ EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -2685,7 +2685,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_cronet.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_cronet.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -2827,16 +2827,16 @@ foreach(_hdr
string(REPLACE "include/" "" _path ${_hdr}) string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH) get_filename_component(_path ${_path} PATH)
install(FILES ${_hdr} install(FILES ${_hdr}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}" DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
) )
endforeach() endforeach()
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc++_cronet EXPORT gRPCTargets install(TARGETS grpc++_cronet EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -2855,7 +2855,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_error_details.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_error_details.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -2893,16 +2893,16 @@ foreach(_hdr
string(REPLACE "include/" "" _path ${_hdr}) string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH) get_filename_component(_path ${_path} PATH)
install(FILES ${_hdr} install(FILES ${_hdr}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}" DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
) )
endforeach() endforeach()
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc++_error_details EXPORT gRPCTargets install(TARGETS grpc++_error_details EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -2922,7 +2922,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_proto_reflection_desc_db.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_proto_reflection_desc_db.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -2964,7 +2964,7 @@ foreach(_hdr
string(REPLACE "include/" "" _path ${_hdr}) string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH) get_filename_component(_path ${_path} PATH)
install(FILES ${_hdr} install(FILES ${_hdr}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}" DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
) )
endforeach() endforeach()
@ -2985,7 +2985,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_reflection.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_reflection.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -3023,16 +3023,16 @@ foreach(_hdr
string(REPLACE "include/" "" _path ${_hdr}) string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH) get_filename_component(_path ${_path} PATH)
install(FILES ${_hdr} install(FILES ${_hdr}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}" DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
) )
endforeach() endforeach()
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc++_reflection EXPORT gRPCTargets install(TARGETS grpc++_reflection EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -3048,7 +3048,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_test_config.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_test_config.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -3116,7 +3116,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_test_util.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_test_util.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -3217,7 +3217,7 @@ foreach(_hdr
string(REPLACE "include/" "" _path ${_hdr}) string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH) get_filename_component(_path ${_path} PATH)
install(FILES ${_hdr} install(FILES ${_hdr}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}" DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
) )
endforeach() endforeach()
@ -3272,7 +3272,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_unsecure.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_unsecure.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -3401,16 +3401,16 @@ foreach(_hdr
string(REPLACE "include/" "" _path ${_hdr}) string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH) get_filename_component(_path ${_path} PATH)
install(FILES ${_hdr} install(FILES ${_hdr}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}" DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
) )
endforeach() endforeach()
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc++_unsecure EXPORT gRPCTargets install(TARGETS grpc++_unsecure EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -3426,7 +3426,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_benchmark.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_benchmark.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -3484,7 +3484,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_cli_libs.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_cli_libs.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -3527,7 +3527,7 @@ foreach(_hdr
string(REPLACE "include/" "" _path ${_hdr}) string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH) get_filename_component(_path ${_path} PATH)
install(FILES ${_hdr} install(FILES ${_hdr}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}" DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
) )
endforeach() endforeach()
@ -3549,7 +3549,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_plugin_support.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_plugin_support.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -3583,16 +3583,16 @@ foreach(_hdr
string(REPLACE "include/" "" _path ${_hdr}) string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH) get_filename_component(_path ${_path} PATH)
install(FILES ${_hdr} install(FILES ${_hdr}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_path}" DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
) )
endforeach() endforeach()
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc_plugin_support EXPORT gRPCTargets install(TARGETS grpc_plugin_support EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -3620,7 +3620,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/http2_client_main.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/http2_client_main.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -3683,7 +3683,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/interop_client_helper.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/interop_client_helper.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -3749,7 +3749,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/interop_client_main.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/interop_client_main.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -3811,7 +3811,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/interop_server_helper.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/interop_server_helper.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -3873,7 +3873,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/interop_server_lib.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/interop_server_lib.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -3935,7 +3935,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/interop_server_main.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/interop_server_main.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -4010,7 +4010,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qps.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qps.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -4073,7 +4073,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_csharp_ext.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_csharp_ext.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -4104,9 +4104,9 @@ target_link_libraries(grpc_csharp_ext
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc_csharp_ext EXPORT gRPCTargets install(TARGETS grpc_csharp_ext EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -4170,7 +4170,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ares.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ares.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -4210,7 +4210,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bad_client_test.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bad_client_test.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -4253,7 +4253,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bad_ssl_test_server.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bad_ssl_test_server.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -4351,7 +4351,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/end2end_tests.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/end2end_tests.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -4449,7 +4449,7 @@ if(WIN32 AND MSVC)
) )
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/end2end_nosec_tests.pdb install(FILES ${CMAKE_CURRENT_BINARY_DIR}/end2end_nosec_tests.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
) )
endif() endif()
endif() endif()
@ -4938,9 +4938,9 @@ target_link_libraries(check_epollexclusive
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS check_epollexclusive EXPORT gRPCTargets install(TARGETS check_epollexclusive EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -5606,9 +5606,9 @@ target_link_libraries(gen_hpack_tables
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS gen_hpack_tables EXPORT gRPCTargets install(TARGETS gen_hpack_tables EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -5640,9 +5640,9 @@ target_link_libraries(gen_legal_metadata_characters
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS gen_legal_metadata_characters EXPORT gRPCTargets install(TARGETS gen_legal_metadata_characters EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -5674,9 +5674,9 @@ target_link_libraries(gen_percent_encoding_tables
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS gen_percent_encoding_tables EXPORT gRPCTargets install(TARGETS gen_percent_encoding_tables EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -6425,9 +6425,9 @@ target_link_libraries(grpc_create_jwt
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc_create_jwt EXPORT gRPCTargets install(TARGETS grpc_create_jwt EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -6618,9 +6618,9 @@ target_link_libraries(grpc_print_google_default_creds_token
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc_print_google_default_creds_token EXPORT gRPCTargets install(TARGETS grpc_print_google_default_creds_token EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -6685,9 +6685,9 @@ target_link_libraries(grpc_verify_jwt
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc_verify_jwt EXPORT gRPCTargets install(TARGETS grpc_verify_jwt EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -10328,9 +10328,9 @@ target_link_libraries(grpc_cpp_plugin
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc_cpp_plugin EXPORT gRPCTargets install(TARGETS grpc_cpp_plugin EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -10366,9 +10366,9 @@ target_link_libraries(grpc_csharp_plugin
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc_csharp_plugin EXPORT gRPCTargets install(TARGETS grpc_csharp_plugin EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -10404,9 +10404,9 @@ target_link_libraries(grpc_node_plugin
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc_node_plugin EXPORT gRPCTargets install(TARGETS grpc_node_plugin EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -10442,9 +10442,9 @@ target_link_libraries(grpc_objective_c_plugin
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc_objective_c_plugin EXPORT gRPCTargets install(TARGETS grpc_objective_c_plugin EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -10480,9 +10480,9 @@ target_link_libraries(grpc_php_plugin
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc_php_plugin EXPORT gRPCTargets install(TARGETS grpc_php_plugin EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -10518,9 +10518,9 @@ target_link_libraries(grpc_python_plugin
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc_python_plugin EXPORT gRPCTargets install(TARGETS grpc_python_plugin EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -10556,9 +10556,9 @@ target_link_libraries(grpc_ruby_plugin
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(TARGETS grpc_ruby_plugin EXPORT gRPCTargets install(TARGETS grpc_ruby_plugin EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
) )
endif() endif()
@ -14190,7 +14190,7 @@ endif (gRPC_BUILD_TESTS)
if (gRPC_INSTALL) if (gRPC_INSTALL)
install(EXPORT gRPCTargets install(EXPORT gRPCTargets
DESTINATION ${CMAKE_INSTALL_CMAKEDIR} DESTINATION ${gRPC_INSTALL_CMAKEDIR}
NAMESPACE gRPC:: NAMESPACE gRPC::
) )
endif() endif()
@ -14199,6 +14199,6 @@ foreach(_config gRPCConfig gRPCConfigVersion)
configure_file(tools/cmake/${_config}.cmake.in configure_file(tools/cmake/${_config}.cmake.in
${_config}.cmake @ONLY) ${_config}.cmake @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_config}.cmake install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_config}.cmake
DESTINATION ${CMAKE_INSTALL_CMAKEDIR} DESTINATION ${gRPC_INSTALL_CMAKEDIR}
) )
endforeach() endforeach()

Loading…
Cancel
Save