diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/libprotoc.cmake | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cmake/libprotoc.cmake b/cmake/libprotoc.cmake index 2d238449..215abcd8 100644 --- a/cmake/libprotoc.cmake +++ b/cmake/libprotoc.cmake @@ -94,6 +94,18 @@ set(libprotoc_files ${protobuf_source_dir}/src/google/protobuf/compiler/zip_writer.cc ) +set(js_well_known_types_sources, + ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types/any.js + ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types/struct.js + ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types/timestamp.js +) +add_executable(js_embed ${protobuf_source_dir}/src/google/protobuf/compiler/js/embed.cc) +add_custom_command( + OUTPUT ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc + DEPENDS js_embed ${js_well_known_types_sources} + COMMAND js_embed ${js_well_known_types_sources} > ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc +) + add_library(libprotoc ${protobuf_SHARED_OR_STATIC} ${libprotoc_files}) target_link_libraries(libprotoc libprotobuf) |