|
| 1 | +diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 2 | +index 0627429f49..60a86853ba 100644 |
| 3 | +--- a/CMakeLists.txt |
| 4 | ++++ b/CMakeLists.txt |
| 5 | +@@ -3588,13 +3588,13 @@ target_include_directories(upb_base_lib |
| 6 | + PRIVATE |
| 7 | + ${CMAKE_CURRENT_SOURCE_DIR} |
| 8 | + ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} |
| 9 | +- ${_gRPC_RE2_INCLUDE_DIR} |
| 10 | +- ${_gRPC_SSL_INCLUDE_DIR} |
| 11 | + ${_gRPC_UPB_GENERATED_DIR} |
| 12 | + ${_gRPC_UPB_GRPC_GENERATED_DIR} |
| 13 | + ${_gRPC_UPB_INCLUDE_DIR} |
| 14 | + ${_gRPC_XXHASH_INCLUDE_DIR} |
| 15 | + ${_gRPC_ZLIB_INCLUDE_DIR} |
| 16 | ++ ${_gRPC_RE2_INCLUDE_DIR} # RE2 and SSL bring in all header files in vcpkg and can shadow other header files. Move them to the end |
| 17 | ++ ${_gRPC_SSL_INCLUDE_DIR} |
| 18 | + ) |
| 19 | + target_link_libraries(upb_base_lib |
| 20 | + ${_gRPC_ALLTARGETS_LIBRARIES} |
| 21 | +@@ -3651,6 +3651,11 @@ add_library(upb_json_lib ${_gRPC_STATIC_WIN32} |
| 22 | + |
| 23 | + target_compile_features(upb_json_lib PUBLIC cxx_std_14) |
| 24 | + |
| 25 | ++# allow undefined symbols in link step, as these symbols can be resolved later |
| 26 | ++if(APPLE) |
| 27 | ++ target_link_options(upb_json_lib PRIVATE -Wl,-undefined,dynamic_lookup) |
| 28 | ++endif() |
| 29 | ++ |
| 30 | + set_target_properties(upb_json_lib PROPERTIES |
| 31 | + VERSION ${gRPC_CORE_VERSION} |
| 32 | + SOVERSION ${gRPC_CORE_SOVERSION} |
| 33 | +@@ -3672,13 +3677,13 @@ target_include_directories(upb_json_lib |
| 34 | + PRIVATE |
| 35 | + ${CMAKE_CURRENT_SOURCE_DIR} |
| 36 | + ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} |
| 37 | +- ${_gRPC_RE2_INCLUDE_DIR} |
| 38 | +- ${_gRPC_SSL_INCLUDE_DIR} |
| 39 | + ${_gRPC_UPB_GENERATED_DIR} |
| 40 | + ${_gRPC_UPB_GRPC_GENERATED_DIR} |
| 41 | + ${_gRPC_UPB_INCLUDE_DIR} |
| 42 | + ${_gRPC_XXHASH_INCLUDE_DIR} |
| 43 | + ${_gRPC_ZLIB_INCLUDE_DIR} |
| 44 | ++ ${_gRPC_RE2_INCLUDE_DIR} # RE2 and SSL bring in all header files in vcpkg and can shadow other header files. Move them to the end |
| 45 | ++ ${_gRPC_SSL_INCLUDE_DIR} |
| 46 | + ) |
| 47 | + target_link_libraries(upb_json_lib |
| 48 | + ${_gRPC_ALLTARGETS_LIBRARIES} |
| 49 | +@@ -3726,13 +3731,13 @@ target_include_directories(upb_mem_lib |
| 50 | + PRIVATE |
| 51 | + ${CMAKE_CURRENT_SOURCE_DIR} |
| 52 | + ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} |
| 53 | +- ${_gRPC_RE2_INCLUDE_DIR} |
| 54 | +- ${_gRPC_SSL_INCLUDE_DIR} |
| 55 | + ${_gRPC_UPB_GENERATED_DIR} |
| 56 | + ${_gRPC_UPB_GRPC_GENERATED_DIR} |
| 57 | + ${_gRPC_UPB_INCLUDE_DIR} |
| 58 | + ${_gRPC_XXHASH_INCLUDE_DIR} |
| 59 | + ${_gRPC_ZLIB_INCLUDE_DIR} |
| 60 | ++ ${_gRPC_RE2_INCLUDE_DIR} # RE2 and SSL bring in all header files in vcpkg and can shadow other header files. Move them to the end |
| 61 | ++ ${_gRPC_SSL_INCLUDE_DIR} |
| 62 | + ) |
| 63 | + target_link_libraries(upb_mem_lib |
| 64 | + ${_gRPC_ALLTARGETS_LIBRARIES} |
| 65 | +@@ -3788,13 +3793,13 @@ target_include_directories(upb_message_lib |
| 66 | + PRIVATE |
| 67 | + ${CMAKE_CURRENT_SOURCE_DIR} |
| 68 | + ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} |
| 69 | +- ${_gRPC_RE2_INCLUDE_DIR} |
| 70 | +- ${_gRPC_SSL_INCLUDE_DIR} |
| 71 | + ${_gRPC_UPB_GENERATED_DIR} |
| 72 | + ${_gRPC_UPB_GRPC_GENERATED_DIR} |
| 73 | + ${_gRPC_UPB_INCLUDE_DIR} |
| 74 | + ${_gRPC_XXHASH_INCLUDE_DIR} |
| 75 | + ${_gRPC_ZLIB_INCLUDE_DIR} |
| 76 | ++ ${_gRPC_RE2_INCLUDE_DIR} # RE2 and SSL bring in all header files in vcpkg and can shadow other header files. Move them to the end |
| 77 | ++ ${_gRPC_SSL_INCLUDE_DIR} |
| 78 | + ) |
| 79 | + target_link_libraries(upb_message_lib |
| 80 | + ${_gRPC_ALLTARGETS_LIBRARIES} |
| 81 | +@@ -3852,6 +3857,11 @@ add_library(upb_textformat_lib ${_gRPC_STATIC_WIN32} |
| 82 | + |
| 83 | + target_compile_features(upb_textformat_lib PUBLIC cxx_std_14) |
| 84 | + |
| 85 | ++# allow undefined symbols in link step, as these symbols can be resolved later |
| 86 | ++if(APPLE) |
| 87 | ++ target_link_options(upb_textformat_lib PRIVATE -Wl,-undefined,dynamic_lookup) |
| 88 | ++endif() |
| 89 | ++ |
| 90 | + set_target_properties(upb_textformat_lib PROPERTIES |
| 91 | + VERSION ${gRPC_CORE_VERSION} |
| 92 | + SOVERSION ${gRPC_CORE_SOVERSION} |
| 93 | +@@ -3873,13 +3883,13 @@ target_include_directories(upb_textformat_lib |
| 94 | + PRIVATE |
| 95 | + ${CMAKE_CURRENT_SOURCE_DIR} |
| 96 | + ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} |
| 97 | +- ${_gRPC_RE2_INCLUDE_DIR} |
| 98 | +- ${_gRPC_SSL_INCLUDE_DIR} |
| 99 | + ${_gRPC_UPB_GENERATED_DIR} |
| 100 | + ${_gRPC_UPB_GRPC_GENERATED_DIR} |
| 101 | + ${_gRPC_UPB_INCLUDE_DIR} |
| 102 | + ${_gRPC_XXHASH_INCLUDE_DIR} |
| 103 | + ${_gRPC_ZLIB_INCLUDE_DIR} |
| 104 | ++ ${_gRPC_RE2_INCLUDE_DIR} # RE2 and SSL bring in all header files in vcpkg and can shadow other header files. Move them to the end |
| 105 | ++ ${_gRPC_SSL_INCLUDE_DIR} |
| 106 | + ) |
| 107 | + target_link_libraries(upb_textformat_lib |
| 108 | + ${_gRPC_ALLTARGETS_LIBRARIES} |
| 109 | +@@ -15420,6 +15430,10 @@ target_link_libraries(grpc_cpp_plugin |
| 110 | + grpc_plugin_support |
| 111 | + ) |
| 112 | + |
| 113 | ++# enable protoc to find plugin on Mac |
| 114 | ++set_target_properties(grpc_cpp_plugin PROPERTIES |
| 115 | ++ INSTALL_RPATH "@loader_path/../lib" |
| 116 | ++) |
| 117 | + |
| 118 | + |
| 119 | + if(gRPC_INSTALL) |
0 commit comments